[Radiant] check for children

Dave Crossland dave at lab6.com
Sun Sep 24 10:50:19 CDT 2006


On 24/09/06, Steven Noels <stevenn at outerthought.org> wrote:
> In my base template, I want to output a <div> 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 <r:if_children> that would work like this:

<ul>
  <r:children:each by="title" order="asc">
  <li><r:link /></li>
  </r:children:each>
</ul>
</r:if_children>

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


-- 
Regards,
Dave



More information about the Radiant mailing list