find all pages that have all content within html macro via SQL

I found this useful link to find which pages are using the html macro. 

https://confluence.atlassian.com/confkb/how-to-find-all-pages-and-spaces-that-use-a-specific-macro-via-sql-747837116.html

However, I'd like to know which pages have all of their content within the html macro (pure html). I can't seem to find way to automate this. Any ideas? 

Also, I'd like to know which pages use the CSS macro. After creating a CSS macro, I see in the source code it's actually called "style", but when I modify my find html macro search (see link) from '%ac:name="html"%'  to '%ac:name="style"%' my search results show many pages pages that have no CSS macro. 

Thanks!

David 

 

2 answers

When you say the whole page is in HTML format, then it is still a Confluence page with the HTML macro for the whole content.

There are couple of alternatives to Atlassian HTML macro, might be you are using those...

You can check the storage format for a particular page to see what macro used to wrap the rest of the content and then move on from that...

Using SQL, I can find if a page is using the HTML macro. But I'd also like to know if the page has content outside of the macro, see source code example below. Any ideas? 

 

<p>This text is NOT in macro</p>
<ac:structured-macro ac:macro-id="185a8ccb-162f-4846-9ab1-6a6fc252b4da" ac:name="html" ac:schema-version="1">
<ac:plain-text-body><![CDATA[this content is inside HTML macro]]></ac:plain-text-body>
</ac:structured-macro>

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

862 views 23 12
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