Hi all,
I’m almost finished with a site built on radiant (my first). But I
still don’t understand behaviors fully.
I have a sub-navigation which changes based on the URL, But I can’t
help but feel that:
A) there is a easier, cleaner way to do this even without behaviors and
B) It seems like this would be something to write a behavior for (I
think)
Here is the code, any suggestions?
(also, the if_url to set the class to “activelink” doesn’t seem to work.
It works if it is hard coded but the slug doesn’t seem to return the
right value while in the if_url context.)
(and yes I know about the navigation tag, but I’d still need to check
the url and
iterate through the children to build the array.)
(and…just in case you were wondering why, I don’t want to see the
children of each page, I want to see the children of each section
throughout each page in the entire section
Area
Section
Page
Page <-- If here, still show section and section children
Page
Page
Page )
START sub-nav snippet
-
<dd class="activelink">
<dd class="activelink">
<dd class="activelink">
<dd class="activelink">
<dd class="activelink">
<dd class="activelink">
end sub-nav snippet
Mac Baker
