Forums / Setup & design / how to override the template of folder_full,and let ....

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.

eZ debug

Timing: Jan 19 2025 07:18:50
Script start
Timing: Jan 19 2025 07:18:50
Module start 'content'
Timing: Jan 19 2025 07:18:50
Module end 'content'
Timing: Jan 19 2025 07:18:50
Script end

Main resources:

Total runtime0.1256 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 589.1797180.8125
Module start 'content' 0.00590.0054 769.992298.0859
Module end 'content' 0.01130.1143 868.0781525.7969
Script end 0.1256  1,393.8750 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00332.6346200.0002
Check MTime0.00131.0176200.0001
Mysql Total
Database connection0.00070.569210.0007
Mysqli_queries0.087970.00011410.0006
Looping result0.00090.74321390.0000
Template Total0.113790.510.1137
Template load0.00090.703010.0009
Template processing0.112989.837310.1129
Override
Cache load0.00060.478510.0006
Sytem overhead
Fetch class attribute can translate value0.00060.476010.0006
XML
Image XML parsing0.00020.148010.0002
General
dbfile0.00302.4023200.0002
String conversion0.00000.003230.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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