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

RefinedWiki - Navigation disappears when using iframe-makro

Confluence: 5.1.1
Refined Wiki: 3.5.3
When using our makro "iframe" wihin a page the Refined Wiki Navigation disappears (Menue is black - no entrys were displayed). iframe code is:
## Developed by: Claus Schlotz
## @param 0:title=url|type=string|required=true
## @param 1:title=Breite|type=string|required=true
## @param 2:title=Höhe|type=string|required=true

<iframe src="$param0" width="$param1" height="$param2"></iframe>

Is this a bug? Please help. Thanks

3 answers

1 accepted

0 votes
Answer accepted

Problem solved.

This solves the problem:

<script type="text/javascript">

document.write('<iframe src="$param0" width="$param1" height="$param2"></iframe>');

</script>

Hi Claus,

The issue seems to be related to how Confluence renders pages through velocity. I found that when rendering a page containing an iframe, everything that should be loaded after the iframe isn't rendered.

When using RefinedWiki OriginalTheme this means that dropdowns, the footer and some templates are not rendered. When using Confluence Documentation Theme instead of RefinedWiki OriginalTheme, the sidebar and footer was not rendered. So I do not believe this issue is related to RefinedWiki.

One solution would be to inject the iframe after page load. For your macro it could look like the following:

## Developed by: Claus Schlotz
## @param 0:title=url|type=string|required=true
## @param 1:title=Breite|type=string|required=true
## @param 2:title=Höhe|type=string|required=true

&lt;div id="iframeMacro"&gt;&lt;/div&gt;

&lt;script type="text/javascript"&gt;
   AJS.$(document).ready(function(){
       AJS.$('#iframeMacro').html('&lt;iframe src="$param0" width="$param1" height="$param2"&gt;&lt;/iframe&gt;');
   });
&lt;/script&gt;

Please let me know if you have further questions.

Best Regards,

Dennis

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Posted in Europe

Daniel Meisen, kreuzwerker, Video and Slides online

Video and slides from this week's Monday Night Special are online. Learn more about the differences between Atlassian Server/Data Center and Atlassian Cloud from Daniel Meisen, kreuzwerker, and find ...

20 views 0 0
View post

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you