Hi,
I'm having a section in my confluence page to display child pages. I want to display that section only if the macro {children} retrives any child pages. I'm not sure how to use the excerpt macro to get this result. Any help greatly appreciated.
Thanks in advance!
You can do this pretty easily with a uer macro. Here is the code. This will create a user macro that you can wrap around the conditional content. If there are children to the page then that section will show, otherwise it will not.
Macro Name:
if_children
Macro Title:
If Children
Macro Body Processing:
Rendered
Template:
## @noparams
#if ($action.page.children.size() > 0)
$body
#end
I can only suggest tinkering with user macro + some velocity code.
Not sure how excerpts macro will help you.
also - referencing your Confluence version might be helpful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.