You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Embedded graphs have title, rather than letting the page set the only title. Title in the iFrame does not match CMS design. Hide the title in the context of an iFrame.
document.addEventListener("DOMContentLoaded",function(){if(window.self!==window.top){// Page is in an iframedocument.getElementById("yourElementID").style.display="block";}else{// Page is not in an iframedocument.getElementById("yourElementID").style.display="none";}});
2.3: "I Wanna Learn the Future" CSS & JavaScript
@media all and (display-mode: browser) {
#yourElement { display: none; }
}
And learn display-mode and how to implement it (JavaScript).
Embedding iframe on a page has problems.
Known Clients
"planning to embed [on page among other elements]"
Problems
1: Full-Width IFrame Limitations
The "Standard" CMS Template is not for full-width content. It reduces and quantizes width of page content. The iframe is too narrow.
Solutions
1.1: Create New CMS template
Create a new CMS template "Standard (with iFrame)".
Tip
Add to TACC/Core-CMS/:
main/taccsite_cms/templates. Reference:standard)fullwidth)djangocms_blog/base)1.2: Use CMS Template "Full Width"
Warning
Page will not have breadcrumbs.
1.3: Use JavaScript
We have temporary, dynamic solutions with JavaScript.
Note
Examples:
2: Title Appearance is Inconsistent
Embedded graphs have title, rather than letting the page set the only title. Title in the iFrame does not match CMS design. Hide the title in the context of an iFrame.
Solutions
2.0: "Just Delete the Title"
Just do not add the title in the app to begin with.
Note
2.1: "Separation of Concerns" JavaScript & CSS
2.2: "One Language for the Luddite" JavaScript
2.3: "I Wanna Learn the Future" CSS & JavaScript
And learn display-mode and how to implement it (JavaScript).