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.
Want to leave your mark on Confluence? One winner will have their whiteboard design added into Confluence for all users to access! This is your chance to showcase your creativity, help others, and gain recognition in the Confluence community.
Share your template today!Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.