Lou, Here's a tag definition you can drop into your project's extension that might help.
tag 'if_self' do |tag| tag.expand if tag.locals.page == tag.globals.page end Since we have better support for detecting the globally rendering page now, we should probably add it to the core. Sean On Dec 5, 2007 8:31 AM, Lou Brothers <[EMAIL PROTECTED]> wrote: > > On Tue Dec 04 16:14:06 UTC 2007, Mohit Sindhwani <[EMAIL PROTECTED]> wrote: > > Lou Brothers wrote: > > > I want to display all of the children of the parent page, and then > > > display the children of the current page only. In this example, Child > > > Page 2 has children, but I am not showing them. > > > > > I haven't tried it but this might work (or something like this): > > > > <r:parent> <-- switch the context to the parent of this page > > <r:children:each> <-- for each child (of the page's parent) > > <r:if_this_is_the_current_page> <-- sorry, I can't remember > > how to match this > > <r:children:each> <--- for each child of this page > > <r:link /> <-- or whatever you want to do > > </r:children:each> > > </r:if_this_is_the_current_page> > > </r:children:each> > > </r:parent> > > > > Maybe, these will help: > > 1. http://lists.radiantcms.org/pipermail/radiant/2006-July/000888.html > > 2. http://www.ruby-forum.com/topic/125811 > > > > Based on #1 above, you may need to match using: <r:page:if_url> > > because that works at the level of the current page, not the level of > > the current context (which in a nested scheme will be the child/ parent > > page). > > > > Hope this helps. > > > > Cheers, > > Mohit. > > 12/5/2007 | 12:14 AM. > > I can't seem to find a reference to an example of determining if a url is the > url of the current page. My attempts at using <r:if_url matches...> have not > been successful. > > _______________________________________________ > 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
