Share » Forums » Setup & design » new section / new template

new section / new template

new section / new template

Tuesday 16 March 2004 4:21:10 am - 4 replies

Author Message

Alex Jones

Tuesday 16 March 2004 6:46:18 am

You are correct in your understanding of sections. Though is you only want to override one folder, you don't have to create a new section. You could choose to override the template for that one folder with a node override instead. For example, either of the two following examples would allow you to override the folder view when placed in your <i>override.ini.append</i>. Note, you will need to change <i>your_special_folder</i> and the node/section ID to match your set up.

<b>Example 1</b>
[your_special_folder]
Source=node/view/full.tpl
MatchFile=<i>your_special_template</i>.tpl
Subdir=templates
Match[node]=<i>23</i>

<b>Example 2</b>
[your_special_folder]
Source=node/view/full.tpl
MatchFile=<i>your_special_template</i>.tpl
Subdir=templates
Match[section]=<i>5</i>

Documentation: http://ez.no/ez_publish/documentation/customization/custom_design/override_templates

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

John Mina

Thursday 18 March 2004 5:31:06 am

Thanks a Lot Alex
i found that the problem was the order of writting the sections in the ini file
tha tcould be also adjusted in the priority box from thes etup interface
THanks Again

Alex Jones

Thursday 18 March 2004 7:21:24 am

Glad to hear you solved it. The order of overrides seems to cause a lot of problems for people. I know it has gotten me in trouble a couple of times. ;)

Alex

Alex
[ bald_technologist on the IRC channel (irc.freenode.net): #eZpublish ]

<i>When in doubt, clear the cache.</i>

poon sg

Friday 05 November 2004 12:26:17 am

Hi,
Sorry, I clicked the topic.
yes , I also don't want to create a section just in order to override a folder, but I met another problem: if I want to let the user to remove or edit self created files,the override template can't works.

1)I let the user have the authority to create,edit or remove
2)Add the corresponng program in specifal_file_line.tpl
3)Modify the override.ini.append file

[specifial_file_folder]
Source=node/view/full.tpl
MatchFile=specifal_file_folder.tpl
Subdir=templates
Match[node]=202

[specifial_file_line]
Source=node/view/line.tpl
MatchFile=specifal_file_line.tpl
Subdir=templates
Match[node]=202

The"the_specifial_file_folder" works fine, but the "specifial_file_line" can't work, still use default file_line.tpl. but if I created a section for the specifial folder, and modified the override.ini.append file as below,is works fine.

[specifial_file_line]
Source=node/view/line.tpl
MatchFile=specifal_file_line.tpl
Subdir=templates
Match[section]=18
Match[class]=12

Is it possible if I don't create a section to let the specifial_file_line.tpl works fine for the specifial folder?

any hint or code will be high appreciate.

regards!
SGpoon

 

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu