We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

how to create on oxwall a new page without head and footer? | Forum

Gilles Jul 22 '18
I would like to integrate in iframe on another site the content of the page event without the menu I want to keep: how to create on oxwall a page without the menu, without head and footer?
Darryl B Leader
Darryl B Jul 22 '18
You could add css to the custom page to remove the elements that you don't want to display using display: none;
dave Leader
dave Jul 22 '18
I am curious if you use CSS to eliminate header and footer then how will you navigate to get back to the site - back button via browser?  

You could use a pop up box to display the iframe, this would allow you to open the box/window in a smaller size and then close it, that way you wont need to navigate away from the page you are on.    However this would call for some special coding and/or a special file creation. 

I would prefer Darryl's suggestion as custom CSS is easy and better, but im just not that good with CSS so maybe some others are and can provide you some details. 

JB TECH Jul 22 '18

You can remove elements from an iframe page using Javscript. From W3:

var iframe = document.getElementById("myFrame");
var elmnt = iframe.contentWindow.document.getElementsByTagName("H1")[0];
elmnt.style.display = "none";

If you don't wish to go through scripting for each element, you can simply copy up the page you wish to display in an iframe, and on that page's custom head codes or even in the body, you can do something like:



And then voila. However, you might want to remove other elements from the page that might collide with elements you're trying to display because of iframe resizing, i.e; sidebars, widgets, etc.


Oxwall Germany Club
Oxwall Germany Jul 23 '18
Topic was moved from General Chat.
Gilles Jul 23 '18

Thank you all for your response and suggestion, below my iframe on a site outside oxwall and my java script file that does not work? can you still help me? :

<iframe id="myevenements" src="https://...exempleoxwall/events" style="width:100%;height:100%;min-height:800px " >   </iframe>

 file.js :

var iframe = document.getElementById("myevenements");
var elment = iframe.contentWindow.document.getElementsByTagName("ow_header")[0];
elment.style.display = "none";

JB TECH Jul 23 '18


Is your "file.js" called to the page with the iframe in the <head> tags of said page? If not, then it's not picking up the script.

Something like:

<script src="file.js"></script>

In your <head> tags.

If not that, try changing your element variable value to: