Thursday 18 August 2011 7:28:55 am

» Back to Roadmap

Description

For most developers, workflow when creating new templates & classes is following:

  1. create class
  2. edit override.ini.append.php to add mapping to views of this class (full, line, etc.)
  3. create files

Step 2 is cumbersome and can be simplified with "convention over configuration" approach known from modern web frameworks such as RoR.

Instead of requiring user to edit "overrides" file, let system search for template with id of class in folder with name of view in your current design folder ("override/templates/VIEW/CLASS_ID.tpl").

For example, assuming I just created class "book" I would go to my design folder and inside "override/templates/full" and "override/templates/line" I could create files "book.tpl" which are default for my class.

Current mechanism override based mechanism can be still used as fallback option.

No reply yet!

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

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 18 2025 02:04:24
Script start
Timing: Jan 18 2025 02:04:24
Module start 'layout'
Timing: Jan 18 2025 02:04:24
Module start 'content'
Timing: Jan 18 2025 02:04:24
Module end 'content'
Timing: Jan 18 2025 02:04:24
Script end

Main resources:

Total runtime0.0885 sec
Peak memory usage4,096.0000 KB
Database Queries53

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.1719152.6563
Module start 'layout' 0.00480.0026 740.828139.5156
Module start 'content' 0.00740.0798 780.3438394.1563
Module end 'content' 0.08720.0013 1,174.500014.3984
Script end 0.0885  1,188.8984 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00283.2083150.0002
Check MTime0.00121.3287150.0001
Mysql Total
Database connection0.00060.681010.0006
Mysqli_queries0.046252.1643530.0009
Looping result0.00040.4756500.0000
Template Total0.063271.420.0316
Template load0.00171.931120.0009
Template processing0.061569.449820.0307
Template load and register function0.00010.169410.0001
states
state_id_array0.00121.400620.0006
state_identifier_array0.00101.122730.0003
Override
Cache load0.00141.5490120.0001
Sytem overhead
Fetch class attribute name0.00080.878710.0008
class_abstraction
Instantiating content class attribute0.00000.005710.0000
General
dbfile0.00070.7567100.0001
String conversion0.00000.007840.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.tplforum_topic/full.tplextension/community_design/design/suncana/override/templates/forum_topic/full.tplEdit templateOverride template
1content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/li.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/li.tplEdit templateOverride template
1content/datatype/view/ezxmltags/ol.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/ol.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 7
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs