Share » Forums » Developer » possible to apply filter on eZP...

possible to apply filter on eZP templates?

possible to apply filter on eZP templates?

Sunday 05 June 2011 8:51:34 am - 3 replies

Author Message

Jérôme Vieilledent

Sunday 05 June 2011 1:53:40 pm

Hi Marko

What do you mean ? A template operator ?

Gaetano Giunta

Sunday 05 June 2011 2:37:51 pm

I was just going to post a feature request that would solve the need at hand: allow the developer to register different 'resource handlers' for the eztemplate class.

This way it would be possible to:

- use the include tpl operator using other namespaces than 'file:' and 'design:' (note: this can also be used when giving a custom pagelayout name in $Results within a module), to allow eg. usage of different template engines

- customize the handler of the standard templates to add some nifty tricks

Principal Consultant International Business
Member of the Community Project Board

Marko Žmak

Monday 06 June 2011 5:29:28 am

@jerome: This is what I mean...

The normal process of eZP template loading and parsing goes like this:

  1. template content is loaded from the template (.tpl) file into a PHP variable (let's say $text)
  2. the content of $text variable is processed and compiled to PHP

What I would like to do is to insert a custom PHP function between step 1. and 2. which would operate on the $text variable and change it's content somehow.

Is this possible?

@gaetano...

Would the feature request you are suggesting solve what I'm looking for?

It looks like your suggestion would work only on templates invoked via template include, and not for templates loaded from override, *_view_gui, OE tags, embed objects...

Am I right?

--
Nothing is impossible. Not if you can imagine it!

Hubert Farnsworth

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

36 542 Users on board!

Forums menu