Forums / General / Override don't work

Override don't work

Author Message

K259

Wednesday 19 July 2006 7:40:56 am

For node 79, I try to show a modified folder-full template, but I only get a blank page in the $content variable.

[full_foldernode79]
Source=node/view/full.tpl
MatchFile=foldernode79.tpl
Subdir=templates
Match[node]=79
Match[class_identifier]=folder

[full_folder]
Source=node/view/full.tpl
MatchFile=full/folder.tpl
Subdir=templates
Match[class_identifier]=folder

I use this setting on another page without any problems, so don't know what's wrong now :(

Kristian Hole

Wednesday 19 July 2006 7:59:24 am

Hi,

The settings look right. A small note: You probably do not need to add a match for class-identifier when you are matching on node_id. There is no other node with a different class identifier.

Look in your debug-output. Does it say: No template could be found for....

In that case you should clear your caches (template+content in the rightmenu of the admin interface), and it should work.

Kristian

http://ez.no/ez_publish/documenta...tricks/show_which_templates_are_used
http://ez.no/doc/ez_publish/techn...te_operators/miscellaneous/attribute

K259

Wednesday 19 July 2006 8:17:08 am

Yes, debug says it can't find foldernode79.tpl, but I've put this in both sitedesign base, standard and forum..and also cleared the cache..

K259

Wednesday 19 July 2006 2:03:40 pm

Now it works. I found out that the foldernode79.tpl had to be in:
/www/design/forum/override/templates ...which I don't find very logical..since the default class I'm overriding for a node is in: /www/design/forum/override/templates/full/..

Why does an override for folder has to be under templates..and not under templates/full?

Kristof Coomans

Thursday 20 July 2006 2:02:37 am

If you want your override template in the full directory, then use

MatchFile=full/foldernode79.tpl

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org