Thursday 18 August 2011 7:28:55 am
For most developers, workflow when creating new templates & classes is following:
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!
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 |
Total runtime | 0.0885 sec |
Peak memory usage | 4,096.0000 KB |
Database Queries | 53 |
Checkpoint | Start (sec) | Duration (sec) | Memory at start (KB) | Memory used (KB) |
---|---|---|---|---|
Script start | 0.0000 | 0.0048 | 588.1719 | 152.6563 |
Module start 'layout' | 0.0048 | 0.0026 | 740.8281 | 39.5156 |
Module start 'content' | 0.0074 | 0.0798 | 780.3438 | 394.1563 |
Module end 'content' | 0.0872 | 0.0013 | 1,174.5000 | 14.3984 |
Script end | 0.0885 | 1,188.8984 |
Accumulator | Duration (sec) | Duration (%) | Count | Average (sec) |
---|---|---|---|---|
Ini load | ||||
Load cache | 0.0028 | 3.2083 | 15 | 0.0002 |
Check MTime | 0.0012 | 1.3287 | 15 | 0.0001 |
Mysql Total | ||||
Database connection | 0.0006 | 0.6810 | 1 | 0.0006 |
Mysqli_queries | 0.0462 | 52.1643 | 53 | 0.0009 |
Looping result | 0.0004 | 0.4756 | 50 | 0.0000 |
Template Total | 0.0632 | 71.4 | 2 | 0.0316 |
Template load | 0.0017 | 1.9311 | 2 | 0.0009 |
Template processing | 0.0615 | 69.4498 | 2 | 0.0307 |
Template load and register function | 0.0001 | 0.1694 | 1 | 0.0001 |
states | ||||
state_id_array | 0.0012 | 1.4006 | 2 | 0.0006 |
state_identifier_array | 0.0010 | 1.1227 | 3 | 0.0003 |
Override | ||||
Cache load | 0.0014 | 1.5490 | 12 | 0.0001 |
Sytem overhead | ||||
Fetch class attribute name | 0.0008 | 0.8787 | 1 | 0.0008 |
class_abstraction | ||||
Instantiating content class attribute | 0.0000 | 0.0057 | 1 | 0.0000 |
General | ||||
dbfile | 0.0007 | 0.7567 | 10 | 0.0001 |
String conversion | 0.0000 | 0.0078 | 4 | 0.0000 |
Note: percentages do not add up to 100% because some accumulators overlap |
Usage | Requested template | Template | Template loaded | Edit | Override |
---|---|---|---|---|---|
1 | node/view/full.tpl | forum_topic/full.tpl | extension/community_design/design/suncana/override/templates/forum_topic/full.tpl | ||
1 | content/datatype/view/ezxmltext.tpl | <No override> | extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tpl | ||
2 | content/datatype/view/ezxmltags/paragraph.tpl | <No override> | extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tpl | ||
1 | content/datatype/view/ezxmltags/li.tpl | <No override> | design/standard/templates/content/datatype/view/ezxmltags/li.tpl | ||
1 | content/datatype/view/ezxmltags/ol.tpl | <No override> | design/standard/templates/content/datatype/view/ezxmltags/ol.tpl | ||
1 | print_pagelayout.tpl | <No override> | extension/community/design/community/templates/print_pagelayout.tpl | ||
Number of times templates used: 7 Number of unique templates used: 6 |
Time used to render debug report: 0.0001 secs