Hi there,
We are trying to output a nested list for our top navigation, the html
is something like this:
<div id="nav">
<ul id="nav">
<li class="menubarfirst"> <!-- This is the first item in the top
level list -->
<a class="actuator" href="1" id="ccActuator" name="ccActuator">1</a>
<!-- The class actuator is the same for all top levels, id and name
are different and specific for all top levels -->
<ul class="menu" id="ccMenu"> <!-- The class menu is the same
for
all second levels, the id will be specific for all second level lists
and have the same prefix as the above id -->
<li><a>Blah</a></li>
...
</ul>
</li>
<li class="menubar"> <!-- All subsequent li's on top level have
this class -->
<a class="actuator" href="1" id="jwActuator" name="jwActuator">1</a>
<!-- The class actuator is the same for all top levels, id and name
are different and specific for all top levels -->
<ul class="menu" id="jwMenu"> <!-- The class menu is the same
for
all second levels, the id will be specific for all second level lists
and have the same prefix as the above id -->
<li><a>Blah</a></li>
...
</ul>
</li>
...
</ul>
</div>
Ok, so with that code above I managed to get this far with the navman
code:
Wrapper:
<div id="mainMenu">
<ul id="menuList">
<%!! Navigation:OutputArea(primary site navigation, Bool:False,
Context:CurrentMasterPage.Id) !!%>
</ul>
</div>
Have a template set at special level 1-1 and selected & non-selected
with just a <navigation:nextlevel> in.
All levels, selected & non-selected Navman template code:
<reddot:cms>
<if>
<query valuea="Context:CurrentIndex.Parent.Id" operator="=="
valueb="Context:FirstIndex.Id">
<if>
<query valuea="Context:CurrentLevelCount" operator="=="
valueb="Int:1">
<htmltext>
<li class="menubarfirst">
<a id="<%!!Context:CurrentIndex.Page.Elements.GetElement
(stf_main_nav_id).Value!!%>Actuator" class="actuator" href="<%!!
Context:CurrentIndex.GetUrl() !!%>">
<%!! Context:CurrentIndex.Headline !!%>
</a>
</li><navigation:nextlevel>
</htmltext>
</query>
<query type="else">
<htmltext>
<li class="menubar">
<a id="<%!!Context:CurrentIndex.Page.Elements.GetElement
(stf_main_nav_id).Value!!%>Actuator" class="actuator" href="<%!!
Context:CurrentIndex.GetUrl() !!%>">
<%!! Context:CurrentIndex.Headline !!%>
</a>
</li><navigation:nextlevel>
</htmltext>
</query>
</if>
</query>
</if>
</reddot:cms>
So the above code manages to loopp through the top level applying the
correct classes and id's to everything, grabbing a standardfield from
the master pages that is set by us allowing the correct id's there
too. This is where I got stuck though, I was unsure how to get the
next level as it seemed to loop any ul's in the nav template which is
why we had the opening div and ul outside the nav man template in the
first place.
I attempted to try something with foreach but I didn't get very far
with that either:
<div id="mainMenu">
<ul id="menuList">
<reddot:cms>
<foreach itemname="Siblings"
object="Context:FirstIndex.SubIndexes">
<htmltext>
<li class="menubarfirst">
<a id="<%!!
Store:Siblings.CurrentMasterPage.Elements.GetElement
(stf_main_nav_id).Value!!%>Actuator" class="actuator" href="<%!!
Store:Siblings.GetUrl() !!%>">
<%!! Store:Siblings.Headline !!%>
</a>
</li>
</htmltext>
</foreach>
</reddot:cms>
</ul>
</div>
I'm not sure whether that is even close, I know the
'firstindex.subindexes' doesn't work, I originally had
'currentindex.parent.subindexes' which at least spat out the top level
pages but if there are any second level pages then it would end up
spitting them out too wouldn't it?
The Store:Siblings.CurrentMasterPage doesn't seem to work either.
Anyway, any help with where I am going wrong or even a completely
different way of doing would be great and very much appreciated!
All the best,
Gareth
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"RedDot CMS Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/RedDot-CMS-Users?hl=en
-~----------~----~----~----~------~----~------~--~---