[Zope-CMF] Overriding standard_html_header

Troy Farrell troy@entheossoft.com
Wed, 26 Feb 2003 14:26:39 -0600


I was afraid you were going to ask that....

Do all this in a test/throwaway portal until you get a feel for it.

1) Go to portal_types.
2) Make a copy of the portal type you want to mimic (I'm using a NewsItem)
3) Rename it to something sane, say "NewNewsItem"
4) Edit the View action (see the "Actions" tab) for NewNewsItems so that 
the action is something like newnewsitem_view.
5) In the portal_skins tool, find the current newsitem_view you are 
using (in 'zpt_content' or 'content', though it sounds to me like you 
are using DTML and not zpt...) and customize it.
6) When it is copied to the "custom" (or whatever other) folder, rename 
it to newnewsitem_view.
7) Customize it to what your newnewsitem ought to look like.

I think you get the idea.

Troy

David Cain wrote:
> Thanks.  I was thinking along the same lines as well.
> 
> Can you tell me what you mean by "give it a new content_view
> method/template with the desired standard_html_header"?
> 
> 
>>-----Original Message-----
>>From: Troy Farrell [mailto:troy@entheossoft.com] 
>>Sent: Wednesday, February 26, 2003 2:34 PM
>>To: David Cain
>>Cc: zope-cmf@zope.org
>>Subject: Re: [Zope-CMF] Overriding standard_html_header
>>
>>
>>Mmm. Not easily.  I assume you mean that you want a content 
>>contributor 
>>to be able to override standard_html_header.  One way (that comes to 
>>mind) would be to create a new content type and give it a new 
>>content_view method/template with the desired standard_html_header.
>>
>>Troy
>>
>>David Cain wrote:
>>
>>>I would an author to be able to override the standard_html_header 
>>>file.
>>>
>>>Is it possible for a normal user that cannot manage the website do 
>>>this?
>>>
>>>
>>>David Cain
>>>Senior Web Developer, Information Systems Department
>>>Syracuse University Library
>>>Syracuse, New York 13244-2010
>>>(315) 443-5923
>>>mailto:dacain@library.syr.edu
>>>mailto:dacain@syr.edu
>>