Contents |
How to show HTML pages inside Xoops
This page describes how to include static HTML pages in your Xoops site.
Most people think you can easily add a link to
the Mainmenu block and the linked site will automatically show up in the center area of Xoops. This is wrong! You have to tell Xoops, that
it has to build the Xoops layout around that HTML site!Basically there are two ways to include/wrap HTML pages into your Xoops
- Including 3 basic inlcude statements into your HTML file
- Use a content module to wrap your HTML pages
1. Basic include statements
You have to edit your HTML file and add the
following lines above and below your HTML content. The relative path to
mainfile.php depends on the folder you saved your HTML file.- <?php</dd>
- include("path/to/mainfile.php");</dd>
- include(XOOPS_ROOT_PATH."/header.php");</dd>
- ?></dd>
- The content of your original html file goes here!!</dd>
- <?php</dd>
- include(XOOPS_ROOT_PATH."/footer.php");</dd>
- ?></dd>
- include("path/to/mainfile.php");</dd>
After you have done that, save your file as
filename.php and no longer filename.html! The extension is important! Now when you call filename.php it will be perfectly included into your
Xoops theme!2. Using a module
A more common way is to use a content module to
include your HTML pages into Xoops. There are a few modules out there which can handle HTML files. You can download the following modules at
xoops.org in the Modules/Themes section.- TinyContent
- CjayContent
- FreeContent
- WF-Sections
For more information on these modules please read the included README files and search the xoops.org Forum!
Michael van Dam

![[Main Page]](/modules/mediawiki/images/mediawiki.png)





