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.