Forum Moderators: coopster

Message Too Old, No Replies

include inside a Fast Template?

         

danny_s

5:51 am on Sep 24, 2003 (gmt 0)

10+ Year Member



Hi everyone
i am useing a template system using the
FastTemplate function, like this

$tpl = new FastTemplate("/data0/www/www.XXXXXXXXXX.net/html/tpl");
if ($lang == 'ENG') {
$content_page = "index_en.htm" ;
}
else {
$content_page = "index_th.htm" ;
}

in the content pages ( index_th.htm or index_en.htm )
i have some includes, they do dnot work!

does anyone know of any issues or problems using the 2 functions together?

calling the includes from the pages outside of the template system works ok, it just when they are within a templete.

thanks for any help
regards
Danny

coopster

1:13 pm on Sep 24, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Your php parser is not defined to process/evaluate documents with a ".htm" extension. I'm guessing you are probably getting something printed on your pages that looks similar to:
include("the_php_i_am_trying_to_include.php"), right? Try changing your "index_en.htm" to "index_en.php" and see if it works correctly.

danny_s

3:10 am on Sep 25, 2003 (gmt 0)

10+ Year Member



Thanks for the reply, but that isn’t the problem, it was the first thing i thought of.
A quick work around was to make the include part of the template array, but i would still like to solve the main problem if anyone has any ideas.
regards
Danny

coopster

1:03 pm on Sep 25, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Try using the eval() statement on your inlude() in index_en.htm.