AtlassianPS / ConfluencePS

Confluence REST API (including Cloud) via PowerShell
https://AtlassianPS.org/module/ConfluencePS
MIT License
150 stars 41 forks source link

Support creation of Full width pages on cloud Confluence #212

Closed ZonderP closed 1 month ago

ZonderP commented 1 month ago

It seems that cloud Confluence is different from on-prem Confluence when it comes to creation of pages. The pages I created on on-prem Confluence have always been full width, but now that my company migrated to cloud Confluence, the pages are small and absolutely not working, since I'm presenting tables on them with quite some columns. It seems I was able to add a 'hack' to 'New-ConfluencePage' which gives me this functionality back.

$Content = [PSObject]@{ type = "page" space = [PSObject]@{ key = "" } title = "" body = [PSObject]@{ storage = [PSObject]@{ representation = 'storage' } } ancestors = @() metadata = [PSObject]@{ properties = [PSObject]@{ 'content-appearance-draft' = [PSObject]@{value = 'full-width'}; 'content-appearance-published' = [PSObject]@{value = 'full-width'}} } }

This last line with 'metadata' seems to do the trick. Now adding this 'metadata' property to the 'content' object could be made optional, e.g. with a switch parameter '-FullWidth'.

Let's see, if this project is still alive... I guess I could make a MR with this, but would it then ever be merged and released?

ZonderP commented 1 month ago

Sorry...

I had to close this, as it seems, that not my 'hack' was responsible to now again have my pages in full width, but it seems someone in our company tweaked some settings on cloud Confluence and now even with my hack not applied, the pages again look like they looked before!