how to override the template of folder_full,and let ....

Author Message

kevin wei

Tuesday 28 December 2004 1:26:05 am

and let all the son folder,grandson folder,... are overrided also?

thanks!

kevin wei

Tuesday 28 December 2004 8:18:06 am

any one can answer?

thanks!

Tobias Persson

Tuesday 28 December 2004 8:46:15 am

I would love to, but I can't understand your question :-). Maybe you could explain some more what you try to do?

kevin wei

Tuesday 28 December 2004 9:20:34 am

there are many level folders:
first level: node 1 <- parent
second level: node 2,node 3,node4.... <- son
third level: node10,node11,node12 .... <- grandson son

i want override these folders' template , but not override once for evrey node using node_id. how to use less template file?

thx!

Tobias Persson

Tuesday 28 December 2004 9:40:38 am

If I understand you correct you would like to have one template for folders at root-level (depth=1) and another template for the folders that are childs of this folder (depth=2) and so on..?

If I should do this I would use the $node.depth variable in the folder_full template.
Something like this

{section show=$node.depth|eq(1)}
{*Template for first level ... *}
{/section}
{section show=$node.depth|eq(2)}
{*Template for second level ... *}
{/section}
{section show=$node.depth|eq(3)}
{*Template for third level ... *}
{/section}
...

Was it something like that you wanted to do?

Paul Borgermans

Tuesday 28 December 2004 1:10:53 pm

Hi,

You can also assign a section in the admin interface to this particular tree of folders and override based on folder class AND section. That way you only need one dedicated template and folders in other parts of your site can use the standard folder template (or another override if you want)

See the template override docs for more

-paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

kevin wei

Tuesday 28 December 2004 4:44:51 pm

thanks two !

yes, this will solve my problem.

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 15:08:56
Script start
Timing: Jan 18 2025 15:08:56
Module start 'layout'
Timing: Jan 18 2025 15:08:56
Module start 'content'
Timing: Jan 18 2025 15:08:57
Module end 'content'
Timing: Jan 18 2025 15:08:57
Script end

Main resources:

Total runtime1.3640 sec
Peak memory usage4,096.0000 KB
Database Queries71

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0043 589.2734152.6563
Module start 'layout' 0.00430.0023 741.929739.4922
Module start 'content' 0.00661.3561 781.4219616.7109
Module end 'content' 1.36270.0013 1,398.132816.1094
Script end 1.3640  1,414.2422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.2179160.0002
Check MTime0.00140.0993160.0001
Mysql Total
Database connection0.00060.040310.0006
Mysqli_queries1.312196.1987710.0185
Looping result0.00060.0421690.0000
Template Total1.333797.820.6668
Template load0.00180.133320.0009
Template processing1.331997.644020.6659
Template load and register function0.00020.016110.0002
states
state_id_array0.00140.105310.0014
state_identifier_array0.00230.166120.0011
Override
Cache load0.00150.1121340.0000
Sytem overhead
Fetch class attribute can translate value0.00070.048530.0002
Fetch class attribute name0.00110.079690.0001
XML
Image XML parsing0.00100.076030.0003
class_abstraction
Instantiating content class attribute0.00000.0013100.0000
General
dbfile0.00090.0689230.0000
String conversion0.00000.000640.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
7content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
9content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 24
 Number of unique templates used: 7

Time used to render debug report: 0.0002 secs