I have a macro I'm writing that would be improved by a conditional that will execute code based on whether a page has children. Does anybody know how to do this?
If you have a page object you can call:
#if($page.hasChildren()) ## do some magic #end
See the page API documentation for more information.
Hope this helps
I see that you can use .hasChildren but $page.hasChildren() did nothing. After some poking around, I found that $content.hasChildren() works just fine.
Thanks Remo!
It looks like you're new here. Sign in or register to get started.