Forums / General / Naming Convention

Naming Convention

Author Message

Softriva .com

Monday 28 August 2006 10:14:39 am

I am starting to get confused about naming my templates and variables.

How do you guys/gals name your templates and variables. Is there a naming convention for naming templates and variables?

OOzy

Christian Johansen

Tuesday 29 August 2006 11:46:48 pm

I put my templates in hierarchies and give them names reflecting the class and if nescessary section or other override criteria. Example:

override/templates:

node/view/full/folder.tpl
node/view/full/news_folder.tpl
node/view/line/folder.tpl
content/datatype/ezstring.tpl

and so on. As for variables I stick to the underscore style of writing names that is used mostly throughout eZ: $date_created and so on.

Pascal von Büren

Wednesday 30 August 2006 12:49:35 am

Hi there,

same goes here for folders and variables.
Additionally, there is a coding standards guide on ez.no for both template language and php:

<b>Template Standards</b>
http://ez.no/ez_publish/documentation/development/standards/template

<b>PHP Standards</b>
http://ez.no/ez_publish/documentation/development/standards/template

Greetings,

Pascal