Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

long description

Quote Reply
long description
i have long description in my link. i used detailed pages to display them. When the description is displayed in a subcategory, I would like to limit the display to 50 or 100 first caracters. How can i do this?

bye

manu

Quote Reply
Re: long description In reply to
You'd need to alter the $Long_Description field such as:

$cat_r->{'Description_50_char'} = substr ($Long_Description, 0, 50);

You'd want to put this before calling subcategory.html in

sub site_html_print_cat

And you'd be able to use the <Ůscription_50_char%> tag to have the short description.


Quote Reply
Re: long description In reply to
The _BEST_ way, though, is to make a new field in the Category table, for "Long_Desc" and "Short_Desc".

That way, you have control over what is used in the Short_Desc, rather than just the first xx characters.

When adding a new category, it takes almost no extra time.

Quote Reply
Re: long description In reply to
thank you pugdog!