This question is in reference to Atlassian Documentation: Page Properties Macro
I would like to read the page properties and display the result in a custom layout.
I know the Free Plugin "GetMetadata" from Comala but with this plugin I can't read metadata in another page...
Can you help me?
Thank you!
I think it is of the form: $pageProperty.from("User") where User is the key. And $pageProperty.from("User", "123") when you have macros with IDs.
How to access from another page, I am not clear on, but maybe this gets you started and you can report back?
Hello,
I tried $pageProperty.from("Field1") in a page with a property "Field1" but It doesn't work...
Where did you find the name of this calss? I didn't find it in the https://docs.atlassian.com/atlassian-confluence/5.9.9/.
My macro is:
-------------------------------------------------------------------------------------------------
## Developed by: <your name>## Date created: 27/07/2016
## @param filter:title=Filter|type=string|required=false|desc=Label filter
<li>$pageProperty.from("Source")</li>
It is not possible to lift the content of the 'page properties macro' directly. I'd like explain the difference between some things here –
I believe the Page Properties Report macro searches for pages with the correct labels on them, parses the page content for the Page Properties Macros, and then pulls the interior <table> element for reporting. You would have to do the same to obtain the data inside the macro.
The JAVA API I am sure would be preferable due to speed. You could use the REST API to use a CQL query like such – <span class="nolink">https://confluence.example.com/dosearchsite.action?cql=siteSearch+~+%22macroName%3Adetails%22+and+type+%3D+%22page%22+and+label+%3D+%22my-label%22&queryString=macroName%3Adetails</span>
<span class="nolink">https://confluence.example.com/dosearchsite.action?cql=siteSearch+~+%22macroName%3Adetails%22+and+type+%3D+%22page%22+and+label+%3D+%22my-label%22&queryString=macroName%3Adetails</span>
"You would have to do the same to obtain the data inside the macro."
Yes...And How I do that? I need to do that, i woluld like a custom layout.
Thank you
If you want to display data on the same page it is stored, the only solution I know of (and have used) is via the metadata plugin.Since it is free (and has been for years), that is the best/easiest solution.
Where I got the syntax was from here: https://help.k15t.com/scroll-pdf-exporter/using-page-properties-as-placeholder-101157314.html
But even if that method is available, I typically have based variables using the metadata plugin.
Does anyone have an example of a PagePropertyExtractor class in Java that can read the page properties from the page body?
I want to build a simple search with which I can filter for the page properties. Now it would only work afterwards. That means, I search for pages by title and filter the result by the specified page properties.
https://community.atlassian.com/t5/Confluence-questions/How-can-I-filter-my-Confluence-search-by-page-properties/qaq-p/953887#M126706
It looks like you're new here. Sign in or register to get started.