I need to change to replace / add page properties.
First I tried to use the page properties directly: myPage.getProperties().setLongProperty(“extranetPageId”,pageid)....
but it no longer persists the property :(
Then I tried another way: myPage.replaceContentProperties(props) but I received an error: Cannot find matching method com.atlassian.confluence.pages.Page#replaceContentProperties(com.atlassian.confluence.content.ContentProperties). Check that the declared type is correct and that the method exists.
Finally, I use the ContentPropertyManager class: contentPropertyManager.setTextProperty(myPage, “extranetPageId”, pageid.toString())
It seems to work, but. I don't see this poprety in the DB in the “contentproperties” table. What is the correct way to replace/add page properties?
I am using version 8.5
Big THX
@KMTek did you take a look at this: https://developer.atlassian.com/server/confluence/content-properties-in-the-rest-api/
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.