macroName: Macro Naming Conventions

Peter Milakovich
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.
February 10, 2016

I'm attempting to use the macroName search to identify all pages using the page properties macro within a specific space, but my results are either empty, or pulling in pages that have the words 'page' or 'properties' on them.

I've tried many different variations trying to get the needed results, and based on what I'm seeing, I think this should be the correct search:

macroName: Page properties          

but I just get returns of pages containing the word page or properties.

Does anyone know the correct search or how you can find the 'true' name of a macro so I can be sure I'm entering it correctly in the search bar?

3 answers

1 accepted

0 votes
Answer accepted
Milo Test
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.
February 10, 2016

You'll have better luck if you put an asterisk after it:

macroName: page properties*
Peter Milakovich
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.
February 10, 2016

Yeah, I've tried that... I just get page returns where the word "page" or "properties" exists in the content.  Thanks though!

Milo Test
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.
February 10, 2016

True, you will get some false positives, but the real pages are in there. Try to NOT boolean the unwanted pages.

My search returned the correct page and a bunch of pages with "properties.Preface."

I was able to eliminate the false positives:

macroName: Page properties* NOT properties.Preface
0 votes
Davin Studer
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.
February 10, 2016

The correct search is ...

macroName:details

Macro's have two names. The one that people see and the one that code sees. The page properties macros name is actually details. You can see this for yourself by adding the macro to a page and then switching over to page source view. This requires have the Confluence Source Editor add-on installed. Another option for you is a user macro that I created that will show you all the macros used with in a space along with a link by each to see a list of each page. Below is a link to the user macro setup.

http://iamdav.in/2015/01/06/confluence-macro-usage-report/

0 votes
Peter Milakovich
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.
February 10, 2016

Thanks Milo, I tried your suggestions, and while they didn't solve my problem, they nudged me in the right direction, confirming my suspicion that 'page properties' was not the correct name.

I went digging through firebug and was able to determine that instead of page properties, I should have been using 'details'.  I know, right?

Once I went with macroName: details I received the correct results.

Thanks for the assistance!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events