RefinedWiki - Navigation disappears when using iframe-makro

Claus Schlotz June 13, 2013

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
Claus Schlotz July 28, 2013

Problem solved.

2 votes
Claus Schlotz July 22, 2013

This solves the problem:

<script type="text/javascript">

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

</script>

0 votes
Dennis Andersen
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.
July 16, 2013

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
AUG Leaders

Atlassian Community Events