Gossamer Forum
Home : Products : Links 2.0 : Customization :

= $thing ?

Quote Reply
= $thing ?
The <%word%> that is in the templates, does it correspond to the same $word that is in the cgi scripts? So that all one needs to do to figure out what to put <%here%> is to find it $here ?

Or have I been up too long? :->


------------------

--Sanguinarius
The Real Vampire Directory
www.sanguinarius.org/cgi-bin/links/pages/
Quote Reply
Re: = $thing ? In reply to
Well, ermm yah. They are all stated in the definition file(links.def).
Quote Reply
Re: = $thing ? In reply to
Correct as far as it goes, but there is a bit more. All the fields in links.def are available as <%links_tags%> in the templates that handle links, but what determines what is really available for use in the template is determined by what is passed to the template from the subroutines in site_html_templates.pl.

For example, sub site_html_add_form contains:

Code:
print &load_template ('add.html', {
clean_category => $clean_category,
Category => $category,
%globals
});

So, add.html can only use the <%links_tags%> of <$clean_category%>, <%Category%> and those variables contained at the top of site_html_templates.pl in the %globals array. No other <%links_tags%> will work in that template.

sub site_html_add_success contains this:

Code:
print &load_template ('add_success.html', {
%in,
%globals
});

The %in variable contains all the data fields that were specified in the form in add.html, so they may all be used, along with the %globals array variables, in add_success.html.

I hope this helps.