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

Is it possible (in confluence) to craft the url for iframe or dynamic to use?

for example, I want to include the results from a internal search engine where the seach is for the page title. I see some references to the page title as a session varable but I have no idea how to get it appended to the end of the URL so that the page renders the results in a iframe

3 answers

1 accepted

1 vote
Answer accepted

Hi John,

Here is a user macro that should do what you need (according to your example):

## @noparams
<ac:macro ac:name="iframe">
  <ac:parameter ac:name="title">Wikipedia Page</ac:parameter>
  <ac:parameter ac:name="height">500</ac:parameter>
  <ac:parameter ac:name="width">100%</ac:parameter>
  <ac:parameter ac:name="src">http://en.wikipedia.org/wiki/$content.getTitle()</ac:parameter>
  <ac:rich-text-body>
    <p> </p>
  </ac:rich-text-body>
</ac:macro>

You should just be able to mix and match as you need.

This did work and on the site I have to use, I have to get an admin to write it. so I sure wish it was more like parsing works in mediawiki. But this does the answer. Thanks,

0 votes
nic Community Leader Jul 16, 2014

Which Atlassian product are you working in here?

nic Community Leader Jul 16, 2014

Ok, so is this about inserting an iframe into a confluence page and pulling data from another system, or inserting confluence into an iframe in another app?

Confluence

First thanks for relpying on this. The content would be in a confluence page here is an example XML fragment :

<ac:macro ac:name="iframe">

<ac:parameter ac:name="title">Wikipedia Page</ac:parameter>

<ac:parameter ac:name="height">500</ac:parameter>

<ac:parameter ac:name="width">1000</ac:parameter>

<ac:parameter ac:name="src">http://en.wikipedia.org/wiki/Helium</ac:parameter>

<ac:rich-text-body>

<p> </p>

</ac:rich-text-body>

</ac:macro>

but I want the currnent page name value to be used instead of hardcoded word : Helium.

thanks again for thinking about this

First thanks for relpying on this. The content would be in a confluence page here is an example XML fragment :

<ac:macro ac:name="iframe">

<ac:parameter ac:name="title">Wikipedia Page</ac:parameter>

<ac:parameter ac:name="height">500</ac:parameter>

<ac:parameter ac:name="width">1000</ac:parameter>

<ac:parameter ac:name="src">http://en.wikipedia.org/wiki/Helium</ac:parameter>

<ac:rich-text-body>

<p> </p>

</ac:rich-text-body>

</ac:macro>

but I want the page name to be used instead of Helium.

thanks again for thinking about this

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in United States

Live! - Austin ACE -- Summer BASH 2019

Hey Austin! Come join us for our 2019 Atlassian Community Summer BASH as we transition ourselves into party status! Bring an attachment, log a great time, and collaborate with new friends as we celeb...

9 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