Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Display confluence page content only

Mario Günter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 11, 2015

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

4 votes
Answer accepted
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 11, 2015

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
Mario Günter
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 12, 2015

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

Błażej O_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 22, 2016

Awesome! Simple and highly functional! Thanks!

Robert Metcalf October 18, 2016

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.

Like Karácsony Kolos likes this
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 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.

Like # people like this
Mariia Padalko October 28, 2016

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.

Daniel Corrigan February 13, 2018

removed comment

Eliot Cole April 25, 2018

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.

Paul OBrien June 7, 2018

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
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 8, 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.

0 votes
Michael Picher February 27, 2019

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

 

Thanks,

  Mike

0 votes
Paul OBrien June 7, 2018

posted in wrong place, and cant delete?

TAGS
AUG Leaders

Atlassian Community Events