Forums / Setup & design / Override order.

Override order.

Author Message

Tore Skobba

Thursday 18 December 2003 3:43:52 am

Hi all

Just wondering about the override system. I have a custom class, this class have it's own class override. In addition I have a node override. This have led me to test out the following cases.

Pseudo override.ini.append file

[full_newsfolder_class_16.tpl]
...
Match[class]=16

[full_newsfolder_node_67.tpl}
Match[Node]=67

Here the node override does not work, and when viewing node 67 the class template is shown instead. However, if I flip the order in the override file then the node and the class override works. Is it supposed to be like this, if yes, are the order of override documented anywhere?

pseude override.ini.append file (this works)

[full_newsfolder_node_67.tpl}
Match[Node]=67

[full_newsfolder_class_16.tpl]
Match[class]=16

Cheers
Tore

Balazs Halasy

Thursday 18 December 2003 3:57:13 am

Yes, this is how it should work. The template override file is read sequentially. The first override that matches in a particular situation will be used. Other, similar/equal overrides will not be used.

Balazs

SathishKumar Subramanian

Thursday 18 December 2003 4:05:25 am

Hi,

All the overridden templates should be present just above the default standard template which was overriden by us in override.ini.append file.

So this works,

[full_newsfolder_node_67.tpl}
Match[Node]=67

[full_newsfolder_class_16.tpl]
Match[class]=16

Examply, the overriden image.tpl should be shown below of all the overriden files of image.tpl

[ted_image]
Source=node/view/full.tpl
MatchFile=ted_image.tpl
Subdir=templates
Match[class]=5
Match[node]=429

[wad_image]
Source=node/view/full.tpl
MatchFile=wad_image.tpl
Subdir=templates
Match[class]=5
Match[node]=430

[image]
Source=node/view/full.tpl
MatchFile=image.tpl
Subdir=templates
Match[class]=5
Match[node]=46

Sathizh

ali t

Friday 25 September 2009 7:03:58 pm

thanks SathishKumar Subramanian

http://www.kizoyunlarioyna.tk
http://arabaoyunlarioyna.tk
http://oyunmanyagi.tk