I have a Page Properties Report on a page called "Test Page 1". It has a filter for "Including Text" and I have typed in "Test Page 1". Basically, this lists all pages that reference this page, as well as defined properties.
My question is, can I reference the page name via some sort of variable so I don't have to change this for every page?
Basically, something like this:
Is this possible?
Well this variable and method is available, but not clear it will work in the macro as a field: $content.getTitle()
I am not exactly clear what you want to do, but take a look at the docs on the CQL field/filter. It does allow references to ancestors and parents.
Unfortunately, that does not work. As far as "what I want to do", not sure how to be more clear. Here are two screenshots that might help. I would like to have the same results with both, but as you can see I do not:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well I am not sure what you mean by
Basically, this lists all pages that reference this page, as well as defined properties.
References how? Links to it?
Did you try adding a filter and using the CQL filter using With title? Or can you filter looking only at child pages (With ancestor), or via page labels?
This may also be a case where a user macro wrapper is what you want to do. Basically create a user macro that retrieves $content.getTitle(), inserting it as a parameter in the report macro. This is a trick I use often to pass special settings OR restrict options for users.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Screenshot 1 shows what I'm doing right now. I'm putting the page title in the "Including Text" filter. It does exactly what I want. "Streaming System" is the title of the page. Any pages that mention the "Streaming System" will then show up in the table. This is what I want. This is working.
The problem is that when I go to make this a template, I'll have to change that field every time. I'd rather access the title dynamically via a variable.
With Title and With Ancestor filters will not help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah, look at my edit. A user macro wrapper is what you want.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I use cloud, so I assume that's not an option... :(
Thanks for your time anyway.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah! Yet another reason to not use cloud. ;-)
BUT I had another thought, if you have access to server Confluence, you can develop and test your user macro, THEN package it as a plugin. Maybe that is a workaround? You would need to confirm with Atlassian support. But to prevent that method, they would have to deny one module type in a plugin.
To get you pointed in the right direction
https://developer.atlassian.com/server/confluence/user-macro-module/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.