Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customizing the Content Report Table Macro

Tags:

confluence

I have been using the content report table macro, which has been working. Ideally, I only want to list content matching certain labels, and lock in an alphabetical sort order and not show the content author.

I have not been successful in figuring out a way to do this just yet.

Is there a way to just edit the source code for that macro and create a "new one"? I'm struggling to find any useful documentation out there.

Any suggestions are appreciated!

like image 804
Aaron A Avatar asked Oct 16 '14 13:10

Aaron A


1 Answers

I was also interested on doing this some days ago. Unfortunately, the Content Report Table Macro only have very limited parameters which are very strict. However, the way I succeeded to display only certain properties from the pages and present them in a tabular way (in Confluence 5.8) was with the combination of the macros Page Properties and Page Properties Report, both of them linked by a unique label. I'll break it down below.

Outcome: enter image description here


1. Set up of properties you want to track

  • Create a page.
  • Add the Page Properties macro (no need to specify an ID)
  • Within the macro just add a table with all the properties you need to keep track of, similar to this:

enter image description here

  • Important, this is what links the two macros together: Add a label to the recently created page.

2. Display properties in main page

  • Add Page Properties Report macro. Specify label used across all the already created pages. Also specify the space (I just love this part). In here you also add custom fields (some fields from Content Reports are here). In Options you can specify which properties to display (columns to show), also the sorting order (in my case I'm sorting by the property ID that I added to each page).

Note: if you just want to remove the content author this can even be done easier: no need to add any property, just specify the label of your pages and add the fields you need to show and sorting order.

Hope this helps.

like image 61
kajahno Avatar answered Oct 23 '22 12:10

kajahno