Hot shit! :P
-- Travis Bell [EMAIL PROTECTED] On 23-Aug-07, at 6:15 PM, Ryan Heneise wrote: > Travis, > > <r:nav /> will automatically attach the class "current" to the <li> > tag of the current page in the hierarchy: >> <li class="current"><a href="/a_page/a_sub_page/">A Sub Page</a></li> > > Or, you could use <r:if_self /> like this: > > <r:children:each> > <li<r:if_self> class="current"</r:if_self>><r:link /></li> > </r:children:each> > > > > > On Aug 23, 2007, at 5:33 PM, Travis Bell wrote: > >> Hey Ryan, thanks for the link. >> >> Let's say I have this rendering sub-pages for a nav... >> >> <div id="subnav"> >> <ul> >> <r:children:each> >> <li><r:link /></li> >> </r:children:each> >> </ul> >> </div> >> >> How could I employ your code to render something with the <li> which >> page is loaded gets, >> >> <li><r:link class="selected" /></li> >> >> appended to it? This is what I am not sure about... >> >> >> -- >> Travis Bell >> [EMAIL PROTECTED] >> >> >> >> >> >> On 23-Aug-07, at 3:41 PM, Ryan Heneise wrote: >> >>> I made an extension that might work for you: >>> http://svn.artofmission.com/svn/plugins/radiant/extensions/ >>> navigation_tags/ >>> >>> This tag: >>> <r:nav /> >>> >>> Outputs something like this: >>> <div id="nav"> >>> <ul> >>> <li><a href="/about/">About</a></li> >>> <li> >>> <a href="/a_page/">A Page</a> >>> <ul> >>> <li class="current"><a href="/a_page/a_sub_page/">A Sub >>> Page</a></li> >>> <li><a href="/a_page/another_sub_page">Another Sub Page</ >>> a></li> >>> </ul> >>> </li> >>> </ul> >>> </div> >>> >>> Or you can build your own using the tags: >>> <if_children /> >>> <if_self /> >>> <if_ancestor_or_self /> >>> >>> See http://svn.artofmission.com/svn/plugins/radiant/extensions/ >>> navigation_tags/lib/navigation_tags.rb for details. >>> >>> >>> On Aug 23, 2007, at 12:20 PM, Travis Bell wrote: >>> >>>> OK, let's take a slightly different approach. >>>> >>>> Seems the best way I can get a dynamic sub-nav is by creating a new >>>> <r:if_url> for each section like this: >>>> >>>> <r:if_url matches="/team/"> >>>> <r:find url="/team/"> >>>> <div id="subnav"> >>>> <ul> >>>> <r:children:each> >>>> <li><r:link/></li> >>>> </r:children:each> >>>> </ul> >>>> </div> >>>> </r:find> >>>> </r:if_url> >>>> >>>> This work, albeit a little lame, but it's the best I can it >>>> seems we >>>> can do... here's one last question though... >>>> >>>> Is there a way I could add a way to detect if I'm on a selected >>>> page, >>>> then to say, add class="selected" just like the <r:navigation> tag >>>> (the <r:here> option)? >>>> >>>> At first I thought it would be sweet to essentially embed the >>>> <r:children> tag inside the <r:navigation> tag (this would create a >>>> truly dynamic navigation) but it's not built to do this. >>>> >>>> Any other ideas out there? >>>> >>>> Thanks guys! >>>> >>>> -- >>>> Travis Bell >>>> [EMAIL PROTECTED] >>>> >>>> >>>> >>>> >>>> >>>> On 22-Aug-07, at 2:30 PM, Damien McKenna wrote: >>>> >>>>>> -----Original Message----- >>>>>> From: Travis Bell >>>>>> Sent: Wednesday, August 22, 2007 4:18 PM >>>>>> Subject: [Radiant] Using a dynamic sub-navigation... >>>>>> >>>>>> The general functionality works with <r:children:each> but once >>>>>> I go >>>>>> 2 pages deep, there are no sub pages so it breaks (obviously). >>>>> >>>>> <r:find url="/articles/"> >>>>> <ul> >>>>> <r:children:each limit="10" order="desc"><li><r:link >>>>> /></li> >>>>> </r:children:each> >>>>> </ul> >>>>> </r:find> >>>>> >>>>> That builds a menu of all of the children of the /articles/ page. >>>>> >>>>> >>>>> Damien McKenna >>>>> Web Developer >>>>> The LIMU Company >>>>> _______________________________________________ >>>>> Radiant mailing list >>>>> Post: [email protected] >>>>> Search: http://radiantcms.org/mailing-list/search/ >>>>> Site: http://lists.radiantcms.org/mailman/listinfo/radiant >>>> >>>> _______________________________________________ >>>> Radiant mailing list >>>> Post: [email protected] >>>> Search: http://radiantcms.org/mailing-list/search/ >>>> Site: http://lists.radiantcms.org/mailman/listinfo/radiant >>>> >>> >>> ------------------------------------------------ >>> Ryan Heneise >>> Art of Mission, Inc. >>> 3720 Gattis School Rd #800 PMB 245 >>> Round Rock, TX 78664 >>> >>> 800-722-1492 >>> >>> www.artofmission.com >>> [EMAIL PROTECTED] >>> >>> >>> >>> _______________________________________________ >>> Radiant mailing list >>> Post: [email protected] >>> Search: http://radiantcms.org/mailing-list/search/ >>> Site: http://lists.radiantcms.org/mailman/listinfo/radiant >> >> _______________________________________________ >> Radiant mailing list >> Post: [email protected] >> Search: http://radiantcms.org/mailing-list/search/ >> Site: http://lists.radiantcms.org/mailman/listinfo/radiant >> > > ------------------------------------------------ > Ryan Heneise > Art of Mission, Inc. > 3720 Gattis School Rd #800 PMB 245 > Round Rock, TX 78664 > > 800-722-1492 > > www.artofmission.com > [EMAIL PROTECTED] > > > > _______________________________________________ > Radiant mailing list > Post: [email protected] > Search: http://radiantcms.org/mailing-list/search/ > Site: http://lists.radiantcms.org/mailman/listinfo/radiant _______________________________________________ Radiant mailing list Post: [email protected] Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant
