[Zope-CMF] Re: [Checkins] SVN:
ra at burningman.com
Tue May 16 15:42:48 EDT 2006
> Rob Miller wrote:
>> Tres Seaver wrote:
>>> yuppie wrote:
>>>> I'm trying to understand that checkin.
>>>> I don't think it is generally a good idea to limit exports to specific
>>>> meta_types. I just did that in the FolderXMLAdapter to make sure there
>>>> is no overlapping with the content handler.
>>>> But given there *is* a problem with using self.context.read()for other
>>>> meta_types than 'Page Template': Why would anybody want to override
>>>> supported_meta_type and use _exportBody for other meta_types?
>>> I'm betting this is to support CMFFormController's TTW templates.
>> that's exactly it. although, depending on how i end up proceeding w/
>> the skin export support (composing a reply to yuppie's other post
>> now), it may not be necessary, after all.
> I still don't understand what you tried to do. If you want to support
> ControllerPageTemplates you write a special adapter for them. And if
> that special adapter is used the generic PageTemplates adapter isn't
> used for ControllerPageTemplates. No need to filter out
> ControllerPageTemplates in the generic adapter.
> What am I missing?
the reason for putting the check in the PageTemplate adapter was because
FSPageTemplate objects, inheriting from PageTemplate will also return the
PageTemplate adapter, but we don't actually want them to be exported.
the reason for making it a variable on the class was because it allowed me to
create the ControllerPageTemplate adapter (which has the same problems w.r.t.
FSControllerPageTemplates) as a subclass of this adapter, with the only
differences being the __used_for__, suffix, and supported_meta_type values.
of course, this was before i went down the .metadata rabbit-hole. it may
disappear as i rethink how that all works.
does that clarify?
More information about the Zope-CMF