Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

PageBuilder .. loop of other sub-menu options?

Quote Reply
PageBuilder .. loop of other sub-menu options?
Hi,

I'm trying to make some page in PageBuilder, for a "tour"of our new site. Basically, I have;

Code:
<h3>Menu</h3>
<ul>

<%set cur = $page_id%>

<%loop sub_page_loop%>
<%cur%> eq <%page_id%><br>
<%if cur == $page_id%>
<li><strong><a href="<%build_root_url%>/about/tour/<%page_filename%>"><%page_title%></a><%if last%><em>&nbsp;</em> <%endif%></strong></li>
<%else%>
<li><a href="<%build_root_url%>/about/tour/<%page_filename%>"><%page_title%></a><%if last%><em>&nbsp;</em><%endif%></li>
<%endif%>
<%endloop%>

</ul>

For some reason, the loop isn't being created correctly, and only shows the 4 remaining pages, rather than all 5... with one bold.

I could probably just make it using a custom global; but if its already built in.. I'd rather use that feature <G>

TIA

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] PageBuilder .. loop of other sub-menu options? In reply to
Andy, under what cirumstances should:
Code:
<%if cur == $page_id%>
return false when you have:
Code:
<%set cur = $page_id%>
before the loop?

Philip
------------------
Limecat is not pleased.
Quote Reply
Re: [Andy] PageBuilder .. loop of other sub-menu options? In reply to
Spent hours on a similar problem - my guess would be that yours is the same and it is a problem with the loop itself. Can you paste what you are using to generate the loop and what the loop looks like in the tag dump?
Edit: sorry just reread the post and saw that you're using Pagebuilder - may be a completely different issue.

Last edited by:

afinlr: Mar 14, 2005, 5:56 AM
Quote Reply
Re: [Andy] PageBuilder .. loop of other sub-menu options? In reply to
Can you do a template variable dump to see what the tag contains?

Also, could you make sure that all five pages are actually child pages of the current page. The loop will only show child pages of the current page, not the current page itself.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [yogi] PageBuilder .. loop of other sub-menu options? In reply to
Hi,

I managed to get it working with a custom global :)

Basically, we had it formatted like;

Quote:
About
About > Tour Front
About > Tour 1
About > Tour 2
About > Tour 3
About > Tour 4
About > Tour 5
About > Tour 6

The one in red was fine.. while the rest of them didn't even have a dump of the sub_page_loop Unsure

BTW: I've managed to get this working now... so no rush (or even need) to look too far into this. Unless you particually want to :D

TIA

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!