Make layout full-width when creating page

I’m creating pages using a macro and would like to set the layout to full-width. By default it is set to fixed width and a user has to enter page edit mode and click the button ‘make page full-width’. ↔︎
image
Is there a way to control the layout when creating a page using the API?
See also
CONFCLOUD-65654 - how do I set the full-width view when creating a page via the Confluence Cloud REST API?

and https://community.atlassian.com/t5/Confluence-Cloud-articles/What-s-New-in-Confluence-Cloud-October-2019-Edition/ba-p/1199197

I’m pretty sure the answer is a simple no. Very happy to be proven wrong though :see_no_evil:

1 Like

Try to remove “editor” content property

This is possibly the missing piece: https://jira.atlassian.com/browse/CONFCLOUD-65654

For those wondering if full-width is possible through the API, it seems that it is possible through the properties endpoints (here) and when you create new content (here) though the documentation for the create content endpoint does not say so. I found this post which suggests that it is possible through the create content endpoint (here). I made this work in my side project and will put an example of the body I sent below (python code) in case anyone makes it here and is looking. The “content-appearance-draft” and “content-appearance-published” are the properties that need to be set for the page width to appear full.

body = { 'space': { 'key': confluence_space_key }, 'ancestors': [ { 'id': confluence_ancestor_page_id } ], 'type': 'page', 'title': confluence_page_name, 'metadata': { 'properties': { 'content-appearance-draft': { 'value': 'full-width' }, 'content-appearance-published': { 'value': 'full-width' } } } }```
8 Likes

I’ve been looking for that for quite some time now, thank you so much :heart:

Hello, does this still works ? Because it doesn’t here (At the time of writing this ).

Much appreciated kind sir

Yes, just tested using Postman and it is still working to create full-width content.

Any chance I can have the postman file ?(Just the structure or the Csharp code generated from it) as I’m still trying but it doesn’t work (even with Postman). Thank you.