Can I include my own HTML pages in xoops?

Requested by Carnuke and Answered by KXoops07 on 2004/11/13 21:23:28

Can I include my own HTML pages in xoops?

Yes you can. There are several ways to do this, either by using dedicated content wrap modules or by following this procedure:

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.

----------------------------------------------------

include("path/to/mainfile.php");
include(
XOOPS_ROOT_PATH."/header.php");
?>
The content of your original html file goes here!!
include(XOOPS_ROOT_PATH."/footer.php");
?>

-----------------------------------------------------

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
* Mypage

My page is detailed in this FAQ HERE

For more information on these modules please read the included README files and search the xoops.org Forum!

Michael van Dam

This Q&A was found on XOOPS Web Application System : https://xoops.org/modules/smartfaq/faq.php?faqid=253