We currently have a channel displaying information. It is public and non-authenticated with a unique url for each record. It was requested to display this information on another site on our same domain in an iframe. How do I have the channel generate all the same information without the header and footers so I can place it in an iframe?
A channel is just a way to store and access your content, it doesn’t create headers or footers (or in fact any kind of layout), your templates do. If you want a minimalist template, just stick
{exp:channel:entries ...}{title}{/exp:channel:entries ...}
in one and take it from there.
If you have a template that you want to display both as it’s own page and also in an iFrame, and you don’t want to create two templates, then you can try checking if the page is in an iframe, then hide the header and footer of your page.
[removed]
if ( [removed] !== window.parent.location ) {
// The page is in an iframe
//do some stuff to hide the header and footer elements
} else {
// The page is not in an iframe
}
[removed]
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.