On 24 Sep 2006, at 18:49, Sean Cribbs wrote: > Dave Crossland wrote: >> On 24/09/06, Steven Noels <[EMAIL PROTECTED]> wrote: >>> In my base template, I want to output a >>> only if some children of the current page exist. How can I check >>> for children of a page? >> You need to define a new tag like that would work like this: >> This is explained in more details on the wiki - to which I hope >> you'll contribute your experiences with! :-) http:// >> dev.radiantcms.org/radiant/wiki/HowToDefineGlobalTags > Perhaps, but the children:each tag will only work if children > exist. So in a sense it encapsulates the if_children idea. If you > give us a little more context or detail, I might be able to come up > with some code that will do the trick.
I have a <div> containing a secondary navigation that should only be inserted when there's underlying children. Something like: <r:if_children> <div id="sidenav"> <h3>More information</h3> <r:children:each> <a><r:link /></a> </r:children:each> </div> </r:if_children> would do the trick. </Steven> -- Steven Noels http://outerthought.org/ Outerthought Open Source Java & XML stevenn at outerthought.org stevenn at apache.org _______________________________________________ Radiant mailing list Post: Radiant@lists.radiantcms.org Search: http://radiantcms.org/mailing-list/search/ Site: http://lists.radiantcms.org/mailman/listinfo/radiant