This topic is locked

PHP template not HTML

1/21/2009 3:28:03 PM
PHPRunner General questions
R
refael author

Hello,
What if the template is not in HTML format but in PHP format where it has some include functions?
What i did is i changed the template name (e.g. $templatefile = "website_search_temp.php"<img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=question&id=10693&image=1&table=forumtopics' class='bbc_emoticon' alt=';)' /> that's works fine but since this template has some include functions (e.g. <?php include("includes/left_menu.php"); ?> it does not read it!
anyone knows how to solve it?

R
refael author 1/21/2009

I see my question was ignored by the admin :-)
i will try to re-explain:
i have changed the template from html format to php (FROM: $templatefile = "website_search.htm" TO $templatefile = "website_search_new.php".

i did this due to the fact that my page layout contains several include file functions. All works fine but unfortunately the template does not read the include function (it treats it like html code).
is there a way to solve it?
or is there a way to add to the "website_search.php" a function that will add the include flle... so i will add to the template something like {$my_file_here} or {BEGIN my_file}?
I hope its clear this time :-(

J
Jane 1/23/2009

Hi,
unfortunately it's impossible to use PHP code in the templates.

I recommend you to add your PHP code in the custom events (Insert PHP code snippetoption on the Visual Editortab).