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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Thursday in Off-topic

Friday Fun: Magic Eyes

...staring into the background. Once the image pops out in 3D, you can look around the picture and enjoy. If you will see if you are a true illusion master! :) You did it? :) Wow! Awesome! As a bonus...

421 views 79 11
Join discussion

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