Gossamer Forum
Home : Products : Links 2.0 : Customization :

Format of detailed page

Quote Reply
Format of detailed page
I want to use links as a recipe database. I have set it up so that the actual recipe is output on the detailed page. Problem is it ignores the returns. For example, instead of ingredients listed as
x
y
z
it lists them all on one line as x y z.

Any help?


Quote Reply
Re: Format of detailed page In reply to
HTML 103: Paragraph and Line Breaks

To add spaces between fields in your Detailed Pages, you need to add paragraph or line break codes between the tags in the detailed.html file.

Example:

<%FieldName1%>
<p>
<%FieldName2%>
<p>
<%FieldName3%>
<p>

Or you can use:

Code:

< br >< br >


(No spaces.)

Replace FieldName1, FieldName2, and FieldName3 with the NAMES of your x,y,z fields defined in the links.def file.

Hope this helps.

Regards,


Eliot Lee
Quote Reply
Re: Format of detailed page In reply to
Guess I should have been more clear. Sorry.

The way it is currently set up, there is one input box for the entire 'Recipe' which is the field used in detailed. Users input ingredient 1
ingredient 2
and so forth seperated by keyboard returns.

But everything is in one field. Is there any way for it to recognize the hard returns that are input by my users?

Thanks!

Quote Reply
Re: Format of detailed page In reply to
Yes...use the following codes in the sub site_html_detailed routine in the site_html_templates.pl file:

Code:

$rec{'Recipe'} =~ s/\n/<BR>/g;
$rec{'Recipe') =~ s/\n\n/<P>/g;


And, yes, you should've been more explicit about your problem.

Wink

Regards,


Eliot Lee