[Radiant] children:each vs. navigation

Loren Johnson loren at fn-group.com
Fri Oct 20 15:46:43 CDT 2006


Jim Herring wrote:
> Hi,
> 
> I'm building a site in radiant that has a section with a long 
> subnavigation
> menu. Initially I built it like this:
> 
> <r:find url="/section/papers/">
> <r:children:each by="title">
>     <div class="entry">
>         <h3><r:link /></h3>
>         <p><r:content part="shortline" /></p>
>     </div>
> </r:children:each>
> </r:find>
> 
> That works fine, except that I need selected behaviour like r:navigation 
> has
> so that I can add another class to the div class=entry to highlight the 
> sub
> page the user is on.
> 
> I've tried using a big & nasty r:navigation tag (its a long list), but 
> the
> problem in that case are the r:link & r:content bits referring to the
> current page rather than the page I'm creating a link.
> 
> Is there any way to accomplish this with the basic tag set in radiant? I 
> can
> imagine a few ways to modify the r:navigation or r:children:each tag
> definitions, but that doesn't really seem like a great way to go to me. 
> Am I
> missing something obvious here?
> 
> Thanks,
> Jim

Jim,

I've read your message a couple times and don't fully understand your 
question.

This part in particualr is where I'm losing you:

> the problem in that case are the r:link & r:content bits referring to 
> the current page rather than the page I'm creating a link.

Can you clarify this part and I might be able to help. I'm currently 
implementing a site in Radiant which is requiring plent of 
<r:navigation... tags and is crying for some more automated options that 
still have some r:navigation style "selected" and "here" class tagging.

I've had good success creating some global tags and am working on a 
couple of behaviors. Perhaps if I can understand what you're after we 
could collaborate on a new tag or two to meet both our needs.

Loren




-- 
Posted via http://www.ruby-forum.com/.



More information about the Radiant mailing list