Jump to content

include file for an itx template class


samona

Recommended Posts

Hi all,

 

Is there a way to include a file (e.g. overall_header) in the body of a template.  For example what i have is ....

 

I have an index.php file and I want to include an overall header template file that will display the menu.  However, it's not working.

 

<?php

require_once "HTML/Template/ITX.php";

$template = new HTML_TEMPLATE_ITX("./templates");
$template->loadTemplatefile("index.tpl", true, true);

 

When I include require_once("overall_header.php") above the "require_once "HTML/Template/ITX.php";", I only get the "overall_header.php" page displayed.  However, I want the hader and body to be displayed. 

 

The following is the top few lines of the overall_header.php file.

 

<?php

require_once "HTML/Template/ITX.php";

$template = new HTML_TEMPLATE_ITX("./templates");
$template->loadTemplatefile("overall_header.tpl", true, true);

Link to comment
https://forums.phpfreaks.com/topic/125109-include-file-for-an-itx-template-class/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.