Saturday 16 December 2006 12:42:43 am
You can make your own view modes, and if you always have overrides, you don't need to have the base file in place. Example: In some template you do
{def $node_list=fetch('content', 'list'
hash('parent_node_id', $node.node_id,
'class_filter_type', 'include',
'class_filter_array', array('someclass')))}
Now you are asking for the view "archivetable", which doesn't exist by default. That's not a problem - it doesn't even have to exist at all, as long as eZ can find it's override file. It's important to note also that you are overriding the view mode, which is "archivetable", not "full".
[linkmag_archive_tablerow]
Source=node/view/archivetable.tpl
MatchFile=linkmag_archive_tablerow.tpl
Subdir=templates
Match[class_identifier]=link_mag
So, it doesn't matter that node/view/blabla.tpl doesn't exist, as long as you have enought control to know that you won't ask for the view "blabla" for any node that doesn't override this template. It sounds complicated, but in practice it works great for me.
|