Within Links SQL Help/Templates/Template Syntax page, the documentation explains the template "loop" feature, showing the "link_results_loop" usage in the example:
Quote:
Loops: If you are feeling a bit overwhelmed, then you can skip this part. Loops are an advanced feature that provide complete control over the layout of the directory. Perhaps you don't like the fact that the same link.html template is used when displaying a list of search results and for displaying the links in the category page. Well, by default Links SQL only provides you with a <%link_results%> tag, so there is not much you can do, right? Wrong! For all of the major tags, you can use loops instead. Let's look at search results. Instead of:
<p>Here are your matching links:<br><br><%link_results%></p>
You could do:
<p>Here are your matching links:<br><br>
<%loop
link_results_loop%>
<a href="<%URL%>"><%Title%></a>: <%Hits%>
<%endloop%>
So inside the <%loop%> and <%endloop%> tag you have a series of links, and you can use any link attribute you like. However, don't forget you can also use includes, so you could do:
<p>Here are your matching links:<br><br>
<%loop link_results_loop%>
<tr><td><%include link.html%></td></tr>
<%endloop%>
Now link.html will be loaded and parsed!
Now something is strange, as Andy says
links_loop is working, and
link_results_loop doesn't in category.html.
Finally I went into the templates and checked what is the truth about the loop variables.
The result of the loop investigation is the following:
On home.html following loops are available: category_loop
On category.html following loops are available: links_loop, category_loop, related_loop
On new.html following loops are available: link_results_loop, title_linked_loop, (and if you don't have span pages turned on, then the loop contains a list of dates with: new_date, links)
On new index page following loops are available: link_results_loop
On new subpage following loops are available: link_results_loop
On cool.html following loops are available: link_results_loop
On rate_top.html following loops are available: top_rated_loop, top_votes_loop
On review_search_results.html following loops are available: Review_Loop
On search_results.html following loops are available: link_results_loop, category_results_loop
These informations are usually available in the header part of these templates.
It seems, that GT did not follow the same loop naming scheme, so for home.html, category.html, review_search_results.html uses different loop naming scheme.
Probably would be fine if GT would unify these naming schemes (while backward compatibility should be kept for next few versions...).
Or at least a unified documentation, like the above one should be published.
Best regards,
Webmaster33
Paid Support from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...