Gossamer Forum
Quote Reply
Loop Bug?
In category.html you can loop the sub cat names ok as in:

<%loop category_loop%><a href="<%URL%>"><%Name%></a><%endloop%>

BUT although the template comments say you can use a links_loop, this doesn’t work as above so with:

<%loop links_loop%><a href="<%detailed_url%>"><%Title%></a><%endloop%>

doesn’t print anything.

Incomplete loop code for this page?

--------------------------------
Privacy Software
Quote Reply
Re: [BLOOD] Loop Bug? In reply to
I am using the links_loop all the time, and it works fine.

Can you make sure that you have got some links in the category you are looking at.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] Loop Bug? In reply to
You are using this in the 'category.html' template?

That’s strange, this just don’t work for me. The only way it does work is to put an include between the tags as in:

<%loop links_loop%>
<%include link.html%>
<%endloop%>

Odd.

--------------------------------
Privacy Software
Quote Reply
Re: [BLOOD] Loop Bug? In reply to
You got 'if' statements around it?

i.e.

Code:
<%if links%>
<%loop loop_links%>
.. stuff here...
<%endloop%>
<%endif%>

?

Also, you tried a <%GT::Template::dump%> call, to see if the tag exists/has links?

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] Loop Bug? In reply to
I figured out this problem.

If you are using a loop for the links thus not actually using the link.html template then link.html template MUST NOT be entirely blank. Even with hidden comments: <%-- xxx --%> but nothing else the loop wont work. Simply putting in a few line breaks or some text - "page not used" will make sure the loop tag actually shows your links.

I have tested this a few times and this [bug/technical issue?] is there.

Interesting.

--------------------------------
Privacy Software
Quote Reply
Re: [BLOOD] Loop Bug? In reply to
Hi,

Can you expand a bit on this? Are you saying that with a 0 byte link.html file, the following:

<%loop links_loop%>
before
<%include link.html%>
after
<%endloop%>

won't print anything out? But putting any content into link.html fixes that?

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Loop Bug? In reply to
Doesn't having a 0 byte link.hml template kinda defeat the point in LSQL though? Crazy

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Alex] Loop Bug? In reply to
No. Im saying not using the link.html template because using the link variables inside a loop.

However, I latter figured out its actually the <%if links%>....<%endif%> that surrounded my loop doest work if links.html is 0 bytes even when not calling link.html.

--------------------------------
Privacy Software

Last edited by:

BLOOD: Aug 27, 2003, 8:41 AM
Quote Reply
Re: [BLOOD] Loop Bug? In reply to
Ah.. I can see the logic behind that. If link.html is empty, then there will be no HTML held in the <%link%> variable... . not sure if its a bug, or just a limitation.

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!