Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

replace/add page content properties

KMTek
Contributor
October 15, 2024

 

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

1 answer

1 accepted

0 votes
Answer accepted
Brant Schroeder
Community Champion
March 14, 2025
KMTek
Contributor
March 18, 2025

Hi Brant,

That's actually as we solved the issue. :)

Thanks.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.5
TAGS
AUG Leaders

Atlassian Community Events