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

Designing Templates

Quote Reply
Designing Templates
IS there was to find out all the tags that can be used when designing templates? Or do I just have to look at the already designed ones to figure out what they are. I searched the forum but was unable to locate information on this.


Sean Mott
Internet's best weather search engine
Quote Reply
Re: Designing Templates In reply to
In Links 2.0, there was a menu of tags for each template file...but it does not seem to be available in Links SQL. The best thing to do is compare the tags used in the default template files. Also, all the GLOBAL tags can be used across all the template files.


Eliot Lee

Quote Reply
Re: Designing Templates In reply to
The "default" tags can be seen at the top of the HTML_Templates.pm file, in the %GLOBALS hash.

In the Category template, you also have access to all the field names in the category table <%field_name%>, and in the Links.html and Detailed.html templates you have access to all the field names in the Links table <%field_name%>

You also have access to any tags specifically passed to the template (check the HTML_Templates.pm file for the tags that are passed in each subroutine. You'll find them in the call to &load_template in each subroutine.

All the dynamc forms search.cgi, add.cgi, etc use the %in hash, so any tags that are passed in your form are available to the script and thus passed to the next level of template via the $in reference.

You can add tags to be passed to all templates that use HTML_Templates.pm by adding them to the %GLOBALS hash.

Remember -- if you call &load_template directly, as is done in some routines, you bypass the %GLOBALS hash, and you have to pass those tags explicitly.

FAQ: http://www.postcards.com/FAQ/LinkSQL/