Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

HTML Macro Template Style Disappears

Noah Leu March 23, 2021

Hello everyone,

I am working on a Confluence (Version 7.4.6) blueprint and build it with a html macro. The html macro includes some short css changes regarding the table on the page.

Screenshot 2021-03-23 154658.jpg

So far it goes perfectly fine. The macro works and the page looks as it is suppose to be.

However when creating a page with this template, the html macro is interpreted and rebuild on the new page. And here it is how it looks on the new page.

Screenshot 2021-03-23 155047.jpg

You may noticed already, that the style (<style> and </style>) clause is missing. Therefore the text is displayed in the page and the css is not working anymore. I already tried to play around in the source editor and CDATA clauses, but I may did not do it right.

 

Is there a way to let the interpreter know, that the macro should just be copied from the template to the new created page, instead of somehow deleting the style clauses?

1 answer

1 vote
Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 23, 2021

I would come at this problem from another angle. Create a user macro that basically surrounds the body content (your table)  with a classed div tag. You can then either include it in your space CSS or add it to your user macro. That is far more durable a solution PLUS you can update your CSS at any time, and have it apply to ALL instances.

Noah Leu March 24, 2021

Hello  @Bill Bailey ,

thank you for your response. I should have mentioned this earlier, I'm not a system administrator. So I have restricted admin rights. I dont have access to the user macros.

So I am just trying to have the css copied from the template to the new page. If you have another smart idea, please let me know.

Bill Bailey
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 24, 2021

Can you gain Space Admin rights? That would allow you to update the space CSS which would give you another angle.

Noah Leu April 9, 2021

Hello @Bill Bailey ,

sadly I cant. I could find a really wierd solution, by creating a second blueprint with a live template of the main blueprint. In this case the style brackets do not disappear. However many functions are useless now.

For example the task report, which does not work with a live template page.

So in the case you have any other ideas on how to make the html macro work correctly with the blueprint, please let me know. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events