Is there a way to make a CustomContentEntityObject the parent of Pages?

I am creating a custom content type (Called a Platform) that holds pertinent data for software platforms. My goal is to allow our users to create pages of knowledge for these platforms. What I would like to have is a Platform CustomContentEntityObject (which I already have and it works fine) that has many subpages of content of knowledge pages. I have looked around and tried doing something like createpage.action?spaceKey=[spaceKey]&fromPageId=[platformCustomContentEntityId] without success. It looks like that functionality is meant only to allow Page entities to be parents and not custom content.

My question is, is this even possible with the normal methods? I can come up with workarounds, but I really was hoping to be able to leverage the existing child-parent functionality within Confluence.

Thanks,
Andreas

1 Like

Did you find a solution to your problem? I’ve ran into the same issue and can’t find anything in the documentation :confused:

Hello mdj,

No, I was not able to accomplish this as described. What I did instead was create a Blueprint that has a BlueprintListener. Part of the Blueprint wizard sets a context variable for the custom content it was created for. When the BlueprintListener fires, it looks for that context variable. If it’s set, it sets a custom property on the Page using content.getProperties().setLongProperty().

Lastly, to provide special functionality on the page view (since the page is only tied to the custom content by a content property) I overrode the viewpage action with my own custom viewpage action. All that action does is check to see if the content property tying it to a custom content object exists. If it does, it loads that custom content object and the custom viewpage.vm adds some elements to the page.

I hope this makes sense. If you have any other questions, I’ll do my best to respond quickly.

Thanks,
Andreas

1 Like