[Zope-CMF] Re: Custom folder_contents
schubbe at web.de
Tue Dec 9 12:55:47 EST 2003
Tonico Strasser wrote:
> I want to leave the original folder_contents template and override it in
> my skinned folder. (Working with scriptable type information.) I've
> created a python script with the ID 'folder_contents':
> if <condition>:
> return context.my_folder_contents()
> return context.folder_contents()
> Of course this gives me 'Excessive recursion'. Is it possible to
> conditionally override 'folder_contents' without renaming it?
You want to have different templates depending on the Portal Type?
CMF HEAD has Method Aliases to do that:
'folder_contents': 'folder_contents' (or empty)
In CMF 1.3 or 1.4 you could use a python expression for the 'Folder
contents' Action that links to 'folder_contents' or 'my_folder_contents'
depending on the Portal Type. But I'm afraid folder_contents is
hard-coded in some places so that might not help you.
More information about the Zope-CMF