Re: [Zope] Copying a dtml method when creating a ZClass instance

2000-09-03 Thread kamon ayeva

>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: Sat, 02 Sep 2000 10:26:19 +0200
>
>Hi,
>
>kamon ayeva wrote:
> >
> > 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.
>
>Ah yes. But then, you throw all the advantages of aquisition away.
>I would suggest to at least copy the template only on request,
>if changes are really made. The 'web designers' should have the
>opportunity to delete this template to derive their design from the
>previus folder. This way you would not have all the templates laying
>around in every subfolder and making changes very very hard.
>An yes, this is understandable even by the underenlighted web designer
>;-)

Definitely agree. Thanks.

>Cheers
>Tino

Kamon
_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Copying a dtml method when creating a ZClass instance

2000-09-02 Thread Tino Wildenhain

Hi,

kamon ayeva wrote:
> 
> 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.

Ah yes. But then, you throw all the advantages of aquisition away.
I would suggest to at least copy the template only on request,
if changes are really made. The 'web designers' should have the
opportunity to delete this template to derive their design from the
previus folder. This way you would not have all the templates laying
around in every subfolder and making changes very very hard. 
An yes, this is understandable even by the underenlighted web designer
;-)

Cheers
Tino

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Copying a dtml method when creating a ZClass instance

2000-09-01 Thread kamon ayeva

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
>
>Hi Kamon,
>
>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 
>method
> > to each of its instances ? Can someone provide me with a complete 
>snippet to
> > add in the ZClass constructor ?
>
>Copy? Why?
>aquisition should make it 'visible' in every subfolder automatically.
>
>Regards
>Tino

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.

Best Regards,
Kamon
Ecubateur

_
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Share information about yourself, create your own public profile at 
http://profiles.msn.com.


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Copying a dtml method when creating a ZClass instance

2000-09-01 Thread Tino Wildenhain

Hi Kamon,

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 method
> to each of its instances ? Can someone provide me with a complete snippet to
> add in the ZClass constructor ?

Copy? Why?
aquisition should make it 'visible' in every subfolder automatically.

Regards
Tino

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] Copying a dtml method when creating a ZClass instance

2000-09-01 Thread Chris Withers

kamon ayeva wrote:
> 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 method
> to each of its instances ? Can someone provide me with a complete snippet to
> add in the ZClass constructor ?

It might be easier to move the the DTML document to the Product your
ZClass is in.

Then you could use the examples from the ZCMG and ZDG on
zope.org/Documentation about factories and cloning...

HTH,

Chris

PS: I think something like manage_clone is what you're after...

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )