Share » Forums » Developer » php codes in templates

php codes in templates

php codes in templates

Thursday 08 May 2008 7:56:49 am - 2 replies

Author Message

Piotrek Karaƛ

Thursday 08 May 2008 8:41:37 am

No, it's not possible and it is not meant to. You can gain access to your custom PHP code via custom template operators, for example.

--
Company: mediaSELF Sp. z o.o., http://www.mediaself.pl
eZ references: http://ez.no/partners/worldwide_partners/mediaself
eZ certified developer: http://ez.no/certification/verify/272585
eZ blog: http://ez.ryba.eu

Maxime Thomas

Friday 09 May 2008 2:07:52 am

Hi,

The main point of the Template engine is to provide an abstract layer between your language (PHP) and the view (~HTML). It's useful to help separating the view from the controler in an MVC despign pattern.
So if you put PHP in your templates, you are breaking the abstract layer and by this way the MVC pattern.

Cheers.

Maxime Thomas
maxime.thomas@wascou.org | www.wascou.org | http://twitter.com/wascou

Company Blog : http://www.wascou.org/eng/Company/Blog
Technical Blog : http://share.ez.no/blogs/maxime-thomas

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu