php code in template blocks?

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Igor
Posts: 97
Joined: Fri 30. Apr 2004, 16:30
Location: The Netherlands
Contact:

php code in template blocks?

Post by Igor »

Hello, I want to insert the code

Code: Select all

<?php
include "menu.htm";
?>
in my templates. I use a jumpbox menu to jump quickly to a certain topic on my site. I want to define the menu in the external file menu.htm. So, I only have to change the menu at one place (I use 10 different templates :wink: ). It doesn't work. The php code isn't processed. What can I do?
Igor
Igor
Posts: 97
Joined: Fri 30. Apr 2004, 16:30
Location: The Netherlands
Contact:

Post by Igor »

Sorry, I found it: the [PHP] tag of course. It's a hell of a job to search in 5000 threads..... :shock:
Igor
Igor
Posts: 97
Joined: Fri 30. Apr 2004, 16:30
Location: The Netherlands
Contact:

Post by Igor »

Sorry again, that reply was too early. I get the following parse error:
Parse error: parse error, unexpected '<' in /home/aspaffen/www/include/inc_front/front.func.inc.php(2048) : eval()'d code on line 1
I put the complete code between [PHP] and [/PHP]. Removing <? and ?> didn't help either.

Help me.
Igor
Pappnase

Post by Pappnase »

hello only the code without <>
Karla
Posts: 223
Joined: Tue 26. Oct 2004, 11:56

Post by Karla »

Seems like it ~should~ be:
[PHP]include("/full path to/menu.htm");[/PHP]
or :
[PHP]require("/full path to/menu.htm");[/PHP]
Igor
Posts: 97
Joined: Fri 30. Apr 2004, 16:30
Location: The Netherlands
Contact:

Post by Igor »

Hello, I entered

Code: Select all

[PHP]include "menu.htm";[/PHP]


and the problem was solved. Thanks a lot!
Igor
Post Reply