It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Display confluence page content only

Hi there,

 

is it possible to display the content of a page ONLY.

That means no header, no sidebar and that stuff. Just the page content is need.

 

Why would you do this?

I'm trying to implement a help popup where the content is stored in confluence.

 

3 answers

1 accepted

3 votes
Answer accepted

Yep, you sure can. Create a user macro with the below code. Then put the user macro on the page that you want to only show the content on. Finally access the page and add ?frameable=true to the end of the url.

## Developed by: Davin Studer
## Date created: 04/02/2015
## @noparams
#if($req.getParameter('frameable') == "true")
<style>
#header, #footer, .ia-splitter .ia-splitter-left {display: none !important;}
#main {margin-left: 0 !important; border: 0 !important;}
body {background: #FFFFFF !important;}
</style>
#end

Update 6/8/2018: fixed html encoding

Hi Davin! You're my HERO! Thank you so muche! Very appreciated! Cheers,Mario

Awesome! Simple and highly functional! Thanks!

I want a solution that will work on a lot of pages at once without inserting into every one. I am embedding using an iframe.

Davin Studer Community Leader Oct 18, 2016

You can do that with the above user macro as well. Just create the user macro and then add the macro to the page decorator in Confluence Admin -> Layouts. Probably the Page Layout decorator would be the one you would put it into. Then it will be added to every page and every page could be iframed.

I have some problem with a calendar in this case. It disappears on page by url  with ?frameable=true. How can I fix it. Thanks.

Afternoon! Is there a way to do this without creating a macro? (user macros are disabled - or I can't find out how to make them - here)

I've tried using CSS, but it didn't work:

.theme-header { display:none !important; }

Whoops. Looks like I'm looking at the theme header. Which is what I want to remove, just for one page, the front page. I have a nav bar in it which is pointless on the front page, and that's large anyway.

I'll keep searching!

 

FINAL EDIT

Sorted it.

I had my IDs and classes mixed up, so ... err ... I'll get mi' coat:

#theme-header { display:none !important; }

Boom. Single page. Theme header removed.

This is exactly what i am after but i cant make it work.. sorry, new to confluence macros.. so i have added a user macro and pasted in the code above.

When i add ?frameable=true to my URL, where the Macro is on the page, i see the below but i can still see nav.  Is there a setting on the macro i need to set so this code is 'rendered' in the page output?  ive tried different options to no avail.. any help appreciated

2018-06-08_9-00-24.png

Davin Studer Community Leader Jun 08, 2018

This was converted from the old Atlassian Answers site. When they did that the encoding of code blocks got borked a bit. I'll fix the above code.

posted in wrong place, and cant delete?

Does this not work if you're using a theme?

 

Thanks,

  Mike

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted 3 hours ago in United States

Summit Recap!

For all those who couldn't make it to Summit (and even those who could) we are doing a recap of Summit 2019! Come out to hear about all the updates, get some free food and drinks, and some swag. ...

6 views 0 0
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you