How to load content without header and footer template

How to load content without header and footer template

  

I'd like to load a screen inside web block using iframe....but only the main container of the screen to be loaded ... I don't want the header and footer....is that possible how to achieve that?

for example, give  the page an extra parameter like "foo.aspx?iframe=true"

then based on on thata parameter you hide/show the header footer with for example css-style

"display:none;"

Hi Eric, 

If you have access to the page, but it is not an OutSystems page, you can do as J. said. You will need to change the page, anyway.

If it is an OutSystems page, the better would be to set the content inside a web block and use it both in the original page as well as in the page you want to use the iFrame, but in this case, instead of the iFrame, you would simply use only the web block.

But, as is usually the case when we are using iFrames, you don't own the page or can't change it, what you're trying to do is veeeery bad. First, you can't do that only using CSS. You will need to use JavaScript and the probability of work is very low if the owner of the page knows how to secure its page. This is what we call "Cross Site Scripting" and is a huge security problem. Not to mention ethical and legal problems involving change content you don't own. So, if this is the case, unless is everything ok with the page owner, I will strongly advice against it.

Hope this can cast some light on this issue.
Hope it helps.

Cheers,
Eduardo Jauch

Eduardo Jauch wrote:

Hi Eric, 

If you have access to the page, but it is not an OutSystems page, you can do as J. said. You will need to change the page, anyway.

If it is an OutSystems page, the better would be to set the content inside a web block and use it both in the original page as well as in the page you want to use the iFrame, but in this case, instead of the iFrame, you would simply use only the web block.

But, as is usually the case when we are using iFrames, you don't own the page or can't change it, what you're trying to do is veeeery bad. First, you can't do that only using CSS. You will need to use JavaScript and the probability of work is very low if the owner of the page knows how to secure its page. This is what we call "Cross Site Scripting" and is a huge security problem. Not to mention ethical and legal problems involving change content you don't own. So, if this is the case, unless is everything ok with the page owner, I will strongly advice against it.

Hope this can cast some light on this issue.
Hope it helps.

Cheers,
Eduardo Jauch

Yes this is my own page within Outsystems...The case is I need to load a screen within a screen. I already using webblock to load the screen via iframe. But this looks awkward because header and footer are loaded inside an iframe.

For example I have screen A and B and I have main screen X. I want to load screen A and B within screen X. So I put 2 web block in screen X, one is for screen A and another one for screen B. Each web block has iframe to load screen A and screen B respectively. Screen A and Screen B also accessible independently via menu. 


Solution

Hi Eric,

Don't use iFrames to do this.
You are thinking in pages, but in this case, it's better to think in "content".

You have content A and B that appear on their own pages (Y and Z), but you want them to also appear on a third page (X).

This is exactly what Web Blocks exists for.

So, put the CONTENT A (UI and associate logic) in a web block (WebBlockA). Do the same with CONTENT B (WebBlockB).

Now, you just use WebBlockA on page Y, WebBlockB on page Z, and put both web blocks in page X.

No need to use iFrames. No need to worry about how the content will show up, if the header and footer will be there, because they wont. Heade and Footer are page elements, and now your content is separated from the "layout". :)

Cheers,
Eduardo Jauch

Solution

Eduardo Jauch wrote:

Hi Eric,

Don't use iFrames to do this.
You are thinking in pages, but in this case, it's better to think in "content".

You have content A and B that appear on their own pages (Y and Z), but you want them to also appear on a third page (X).

This is exactly what Web Blocks exists for.

So, put the CONTENT A (UI and associate logic) in a web block (WebBlockA). Do the same with CONTENT B (WebBlockB).

Now, you just use WebBlockA on page Y, WebBlockB on page Z, and put both web blocks in page X.

No need to use iFrames. No need to worry about how the content will show up, if the header and footer will be there, because they wont. Heade and Footer are page elements, and now your content is separated from the "layout". :)

Cheers,
Eduardo Jauch

I think you're right. Thanks for the insight.


Glad to help, Eric.

Cheers

Eduardo Jauch