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

Making data avalible on template

Quote Reply
Making data avalible on template
I have added a new field to my Category Database and now I want to make it available to the category templates. I know I need to modify HTML_Templates.pm but what do I add to the sub?

Thanks,
Steven
Quote Reply
Re: Making data avalible on template In reply to
it should already be available to the template.. just mod the category.html template with <%FIELDNAME%>

and it should work..

jerry
Quote Reply
Re: Making data avalible on template In reply to
Actually, I don't think it will. For some reason (I swear there was one), you need to manually add the fields. You should edit nph-build.cgi and in sub build_category_pages add after:

$OUT{description} = $category_r->{'Description'};

$OUT{your_field} = $category_r->{your_field};

Hope this helps,

Alex