This site has been archived and you can no longer log in or post new messages. For up-to-date community resources please visit

eZ Community » Learn » eZ Publish » Understanding and developing fetch...

Understanding and developing fetch functions

Tuesday 14 September 2010 1:41:06 pm

  • Currently 5 out of 5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5


Here is a quick recap :

  • Developing fetch functions is an easy way to extend eZ Publish template language
  • They can help you to simplify code in your templates and make it more efficient
  • They are easier to write than template operators
  • They are callable from templates and from PHP

Please remember that templates should remain simple. As soon as you need to add too much complexity, consider developing a fetch function; you will be hands free and your code will be much easier to maintain.

Also note that you are not forced to write all code in the same PHP static method ! You can delegate part of your code into dedicated classes (Model in MVC pattern).

This tutorial is available in PDF format for offline reading :
Jérôme Vieilledent - Understanding and developing fetch functions


About the author : Jérôme Vieilledent

Jérôme Vieilledent

Jérôme is a completely self-educated web developer. He learnt PHP all by himself and started developing with eZ Publish in 2007. He is eZ Publish certified and now works as a technical manager and expert at SQLi Agency in Paris.



Creative Commons - Share Alike

This work is licensed under the Creative Commons – Share Alike license ( ).

36 542 Users on board!

Tutorial menu


Printer Friendly version of the full article on one page with plain styles


Proudly Developed with from