Style Macro in New Confluence

We used the following macros in our confluence site to strip out information for home navigation pages. They are now not working since our site has been upgraded to the new look. Any idea of how to get them working now?

 


.page-metadata {display:none;}
#comments-section { display:none; }
#likes-and-labels-container { display:none; }
#main-header { display:none; }
#create-page-button { display:none; }
#footer { display:none; }
#quick-create-page-button { display:none; }

2 answers

1 vote
Stephen Deutsch Community Champion Aug 25, 2017

Hi Patrick,

In the old interface of Confluence, the page was rendered as one contiguous HTML document, so it was possible to use the style macro to affect other parts of the page.

Now that Confluence has been upgraded to the new interface, the page content is rendered as a separate iframe within the larger page. Therefore any style macro within the content will only affect the contents of the content window.

This is unlikely to change, so some sort of solution using the new theming functionality of Atlassian Connect apps will somehow have to fill the gap.

0 votes

Hi Patrick,

Can you let us know where exactly on Confluence you put this CSS? Is it in a Confluence page, or is it on the overview page of a space?

Thank you!

Kind Regards,
Shannon

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,056 views 16 14
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you