Forums

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

How to find pages that DON'T include a specific macro?

Michelle Rau HP
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.
August 15, 2018

Being able to find pages that include a specific macro is incredibly helpful, however I have the opposite challenge: finding pages that do NOT include a specific macro.

In this case the macro is the "include page" macro. I've tried many variations on search syntax but no joy. Help?

(In our wiki, most pages include a customized search bar and help links via an included page. I want to find the pages that *don't* include that page so I can add the search bar where it's missing.)

Thanks in advance!

2 answers

0 votes
Michelle Rau HP
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 5, 2019

Hi Kurt, I took a look at this. Since I'm not a wikispace admin, just a lowly and humble wiki admin :-) I finally got ordinary search parameters to work:

type:page AND NOT macroName: include*

This found all pages in our wiki that DON'T include the "include page" macro. This will help me find and update all the pages that still need a specific page include.

There is probably another search parameter that can help me narrow it down further to pages that don't include a *specific page* (instead of pages that don't have any includes at all) but I haven't worked that out yet.

Thanks for getting me on the right track learning about search though! 

0 votes
Kurt Klinner
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.
August 15, 2018

@Michelle Rau HP

 

Hi Michelle

 

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

shows how to list pages that have a macro in use, so i think by modifying the where clause

you could get the results that you want

AND bc.body not LIKE '%ac:name="<macro_name>"%'

instead of

AND bc.body LIKE '%ac:name="<macro_name>"%';

you might need to add additional clauses to get to the final result

 

Cheers

Kurt

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events