Override node templates or new classes with dedicated templates?

Author Message

Tore Skobba

Thursday 06 November 2003 9:31:51 am

Hi all

My design strategy is to use as few node templates overrides as possible. Instead I make new content classes, and then genereal override templates for the new classes, this means that I do not have to override them on node level. But I have 4 very similar "folder" classes, that is classes consisting of a name, description and children of various type. I think this is better as I think it is easier to get an overview of the design of the site, secondly it allows for more flexibility as the various classes can be altered. Just wondering if anyone else have given any thought to this and have any recommandations.

Cheers
Tore

Marco Zinn

Thursday 06 November 2003 1:26:17 pm

Yes, we thought about that, too.
For example, we have several news folders, which we want to sort my date and display the "modified" date, while we do not want to print date for all other folders.

Creating similar (or identycal) classes to override on class ID has some pro's and con's:
+ your authors can decide, which design they want, without having to temper the override.ini
+ you can introduce different fields as you need

- when you want to make changes to one folder class, that you need for all, you must change all classes, as there is no option to inherit classes
- when you want to change an existing object from one class to another (Folder Type 1 -> Folder Type 2), you will have some problems and probably must create a new object and move all children to the new object and then delete the old one.
The other option is fiddling with the Database ;)

Marco
http://www.hyperroad-design.com

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 04:36:57
Script start
Timing: Jan 19 2025 04:36:57
Module start 'layout'
Timing: Jan 19 2025 04:36:57
Module start 'content'
Timing: Jan 19 2025 04:36:57
Module end 'content'
Timing: Jan 19 2025 04:36:57
Script end

Main resources:

Total runtime0.0163 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0067 589.4141152.6563
Module start 'layout' 0.00670.0025 742.070339.5234
Module start 'content' 0.00920.0051 781.593889.3984
Module end 'content' 0.01430.0020 870.992230.3047
Script end 0.0163  901.2969 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002716.8025140.0002
Check MTime0.00148.6474140.0001
Mysql Total
Database connection0.00106.095510.0010
Mysqli_queries0.003118.802230.0010
Looping result0.00000.109610.0000
Template Total0.00169.810.0016
Template load0.00095.360810.0009
Template processing0.00074.423010.0007
Override
Cache load0.00063.607910.0006
General
dbfile0.00031.663780.0000
String conversion0.00000.055540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs