Forums / Setup & design / PHP code inside templates

"Please Note:
  • At the specific request of Ibexa we are changing this projects name to "Exponential" or "Exponential (CMS)" effective as of August, 11th 2025.
  • This project is not associated with the original eZ Publish software or its original developer, eZ Systems or Ibexa".

PHP code inside templates

Author Message

Francisco Felix

Friday 25 July 2003 1:39:53 pm

I need to executePHP code directly inside templates in order to include external funcionality, for example our poll system or our banner ad server. I made tests and the PHP code come out as is when I included it in the template.

It seems that expanding PHP with specific functions and then writing our own template operator ( http://www.ez.no/developer/ez_publish_3/documentation/development/kernel/custom_template_operators ) would do it, but this method has big disadvantages.

I think tweaking the template rendering system would be sufficient to allow execution of PHP inside them and thus solving the problem, but right now I dont have the knowledge about the Exponential system to do this and cant find that knowledge in the documentation either.

I have tried to understand the code from reading it (as Exponential team suggests) but I have not that kind of talent.

Any help or tougths will be appreciated.

Alex Jones

Friday 25 July 2003 1:45:36 pm

See my reply to your question in the Developer section.

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

Francisco Felix

Friday 25 July 2003 2:25:52 pm

Posting for anyone that has the same need.

http://ez.no/developer/ez_publish_3/documentation/customization/tips_tricks/including_php_files_in_templates

Thanks a lot Alex for your help.

Jan Borsodi

Saturday 26 July 2003 5:32:23 am

I've started a discussion on how this can be solved, please read and comment on it.
http://ez.no/developer/ez_publish_3/forum/suggestions/php_execution_in_templates

--
Amos

Documentation: http://ez.no/ez_publish/documentation
FAQ: http://ez.no/ez_publish/documentation/faq