Hide Children Display Macro in Footer for Blogpost in Confluence

john March 4, 2019

I created a space and modified the Space Layout to contain a custom footer. In the custom footer, I placed the "children display macro" with the intent of making sure that child pages are always visible if they exist for a page. I have also hidden the left column in the layout to maximize the content.

This works well everywhere except for blog entries. The same footer is applied for a blogpost. The macro provides an error "Unable to Render {children}. Can only find children for a page, this is a blogpost."

The ideal case for me would be that the macro should render nothing since it was able to identify the page as a blogpost. The error message is messy.

Is there a way to hide this message when the footer is on a blogpost?

1 answer

1 accepted

0 votes
Answer accepted
Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 4, 2019

You could most likely use CSS to hide it.  You would just need to identify an html hierarchy that would only apply it to blog posts.

john March 4, 2019

That is the path I was pursing. I did just arrive at a solution, but it is a bit of a "nuclear" effect since it affects all pages in the space and I am not certain about the potential side effects. The challenge, in this case, is that the div is dynamically generated by the macro, so I ended up with the following:


div.blogpost div.error[data-macro-name="children"] {
visibility: hidden;
}

Perhaps this is a bug in the "Children Display Macro"?

This CSS does do what I need. Any thoughts on possible negative consequences?

Thanks.

Like Zak Laughton likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events