Thanks Tino and Chris for your feedback.
>From: Tino Wildenhain <[EMAIL PROTECTED]>
>To: kamon ayeva <[EMAIL PROTECTED]>
>CC: [EMAIL PROTECTED]
>Subject: Re: [Zope] Copying a dtml method when creating a ZClass instance
>Date: Fri, 01 Sep 2000 14:18:25 +0200
>kamon ayeva wrote:
> > Hi,
> > I need some help.
> > I have a DTML method at the root of Zope called 'Template'.
> > How can I make the constructor of a ZClass (folderish) to copy this
> > to each of its instances ? Can someone provide me with a complete
> > add in the ZClass constructor ?
>aquisition should make it 'visible' in every subfolder automatically.
I have several reasons whay I need to attach a template to each ZClass.
Among them are:
1/ cases like high level folders where I might want to customize the page's
rendering and/or skin,
2/ cases like contained objects which uses a generic skin (but you can still
customize the skin of one among them, if you want)
3/ my site needs to be easily designed / modified by Web Designers that do
not understand Acquisition.
Thanks for the tip Chris, I was able to do it by adding my
ZClass-specific-template in the Zope Product folder and adding a call to
manage_clone(ZClass-specific-template, 'standard_template', [REQUEST]) in
the ZClass constructor method. I use the same id 'standard_template' to
exploit acquisition globally on the site (the Web designer would not have to
care about that).
Next thing is generalising this method to also allow multiple templates
available for each object i.e. the Content Manager can choose a prefered
skin when instanciating an object.
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.
Share information about yourself, create your own public profile at
Zope maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists -