Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [AtoZ] What's the difference between <%links%> and <%links_loop%>

Quote Reply
Re: [AtoZ] What's the difference between <%links%> and <%links_loop%> In reply to
Instead of Links SQL building output itself and sending it to the template in one tag, ie <%links%>, a loop stores all the data in an arrayref of hashrefs and allows you to customize the display in your template.

If you were to print the loop it would look like:
Code:
[
{ ID => '1', Title => 'Foo', URL => 'http://www.aol.com' etc... },
{ ID => '2', Title => 'Foo', URL => 'http://www.aol.com' etc... },
{ ID => '3', Title => 'Foo', URL => 'http://www.aol.com' etc... },
]

All those hash keys like <%ID%> etc can then be used in your template.
Subject Author Views Date
Thread What's the difference between <%links%> and <%links_loop%> AtoZ 3019 Jun 28, 2002, 12:15 PM
Thread Re: [AtoZ] What's the difference between <%links%> and <%links_loop%>
Andy 2956 Jun 29, 2002, 1:18 AM
Thread Re: [Andy] What's the difference between <%links%> and <%links_loop%>
AtoZ 2930 Jun 29, 2002, 2:06 PM
Thread Re: [AtoZ] What's the difference between <%links%> and <%links_loop%>
Payooo 2971 Jun 29, 2002, 2:21 PM
Post Re: [Payooo] What's the difference between <%links%> and <%links_loop%>
AtoZ 2952 Jun 29, 2002, 2:24 PM
Thread Re: [AtoZ] What's the difference between <%links%> and <%links_loop%>
Alex 2912 Jun 30, 2002, 11:04 PM
Post Re: [Alex] What's the difference between <%links%> and <%links_loop%>
AtoZ 2900 Jul 1, 2002, 12:43 PM
Post Re: [AtoZ] What's the difference between <%links%> and <%links_loop%>
Paul 2926 Jun 29, 2002, 1:41 AM
Post Re: [AtoZ] What's the difference between <%links%> and <%links_loop%>
pugdog 2953 Jun 29, 2002, 4:16 AM