Developer forum

Forum » Templates » Iframe - how to

Iframe - how to


Reply

Hi,

 

I've tried to iframe both @DwContent and @ParagraphText, but the content is not outputted. If I type in some text, the text is shown.

 

<

iframe src="/files/templates/page/frame.html" width="560" height="300" scrolling="auto" frameborder="1">Din browser understøtter ikke iframes.</iframe>

 

Shouldn't this work?

 

Best regards,


Replies

 
Nicolai Høeg Pedersen
Reply
aol@dkis.dk wrote:

Hi,

 

I've tried to iframe both @DwContent and @ParagraphText, but the content is not outputted. If I type in some text, the text is shown.

 

 

 

iframe src="/files/templates/page/frame.html" width="560" height="300" scrolling="auto" frameborder="1">Din browser understøtter ikke iframes.</iframe>

 

Shouldn't this work?

 

Best regards,

 

 

<


 

Not quite sure want you wanna do and where...

 

But if you want to replace "Din browser understøtter ikke iframes." with a template tag you have to be aware of the context. DwContent tag ONLY works in page templates, ParagraphText only works in paragraph templates. Otherwise take a look at global template tags - they work in all templates: http://template.dynamicweb.dk/TemplateTags/Dynamicweb-template-tags/General-tags/Global-template-tags.aspx

 

Use this:

http://template.dynamicweb.dk/TemplateTags/Dynamicweb-template-tags/General-tags/Global-template-tags/GlobalParagraph.Content([ID]).aspx

 

But why give this message? All browseres supports frames. And if they don't - who cares?

 
Reply

No, it's not the iframe message I want to replace. It's the content of "framepage.html" that's not shown.

 

Page-template:

 

<div class="text">

 

     <!--@DwContent-->

 

</div>

 

Paragraph-template:

<

iframe src="/files/templates/paragraph/framepage.html" width="560" height="300" scrolling="auto" frameborder="1">...</iframe>

 

Framepage.html:

!--@ParagraphText--><!--@ParagraphModule--

 

 

Have I forgotten something really elementary?

 
Nicolai Høeg Pedersen
Reply

 

Well - since the framepage.html template is never loaded by Dynamicweb but simply served as an ordinary html the way you are linking it, template tags are never evaluated. So you can not do what you try.

 

If you are trying to make the content of on paragraph scrollable, you should make the paragraph text container scrollable: http://www.htmlite.com/faq015.php

 

 
Reply

Thanks!

 

You must be logged in to post in the forum