[Zope-CMF] Re: WAS Forcing skin change NOW: ways to include common content

Tres Seaver tseaver@zope.com
Mon, 27 Aug 2001 07:30:19 -0400


Lynn Walton wrote:

> I am looking for an answer to this too, so I'm very interested in

> any answers people have.


Thomas Olsen wrote:

>>Is it possible - using ZPT - to include an object which is using another skin?
>>
>>I would like to be able to view document types in two ways:
>>
>> - The default way showing menus etc.
>> - Only the actual document suitable for inclusion in another page.


The skins mechanism is not designed for this kind of usage -- the
SkinContainer munges the acquisition path *very* early in each request
(in the publishing traversal), and is in effect for the duration of the
request.  You might get what you need by:

  - Creating a separate window, either a popup or a frame, whose URL
    includes '?portal_skin=OtherSkin' (this is how the "Printable" skin
    is implemented on cmf.zope.org).

  - Referring to the sub-object using its own, non-skinned methods
    (e.g., 'CookedBody', 'tag').

Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com