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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 00:11:36
Script start
Timing: Jan 19 2025 00:11:36
Module start 'layout'
Timing: Jan 19 2025 00:11:36
Module start 'content'
Timing: Jan 19 2025 00:11:37
Module end 'content'
Timing: Jan 19 2025 00:11:37
Script end

Main resources:

Total runtime0.8518 sec
Peak memory usage4,096.0000 KB
Database Queries59

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0066 587.7891152.6094
Module start 'layout' 0.00660.0030 740.398439.4141
Module start 'content' 0.00960.8408 779.8125538.8828
Module end 'content' 0.85040.0014 1,318.69538.5000
Script end 0.8518  1,327.1953 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.3810160.0002
Check MTime0.00130.1575160.0001
Mysql Total
Database connection0.00190.228010.0019
Mysqli_queries0.799593.8594590.0136
Looping result0.00060.0732570.0000
Template Total0.820996.420.4104
Template load0.00190.226820.0010
Template processing0.818996.140720.4095
Template load and register function0.00030.032410.0003
states
state_id_array0.00110.126110.0011
state_identifier_array0.00110.130920.0006
Override
Cache load0.00160.1828250.0001
Sytem overhead
Fetch class attribute can translate value0.00100.116730.0003
Fetch class attribute name0.00220.256340.0005
XML
Image XML parsing0.00180.213130.0006
class_abstraction
Instantiating content class attribute0.00000.001340.0000
General
dbfile0.00190.2175150.0001
String conversion0.00000.001140.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs