RE: developer-level changes Silva 1.2

"Benno Luthiger" <[email protected]>
Newsgroups gmane.comp.web.zope.silva.devel
Message-ID <000201c519b8$3254eaf0$1e238481@openlu>
Hello

>      * instead of 2 scripts 'render_view' and 'render_preview' only
>        'render' is called for both view and preview, if you want to
>        make a distinction between the two, you can register a new
>        view_type called 'preview' to another subdirectory and place a
>        'render' script in that, the general pattern is that if you want
>        to use only 1 script you place it directly in the
>        'public/<meta_type>' directory, if you want to have seperate
>        scripts for view and preview, create a 'view' and 'preview'
>        directory in that dir ('public/<meta_type>/view' and
>        'public/<meta_type>/preview')
For Silva extension developers this means that they have to register the
public view for their object under ['public', 'MyObject', 'view'] instead of
['public', 'MyObject'], i.e.
reg.register('public', 'My Object Version', ['public', 'MyObject', 'view'])

and to register a preview in addition, i.e.
reg.register('preview', 'My Object Version', ['public', 'MyObject',
'preview'])

Is this correct?
Benno

> -----Original Message-----
> From: silva-dev-bounces-IAPFreCvJWM6s/[email protected]
> [mailto:silva-dev-bounces-IAPFreCvJWM6s/[email protected]]On Behalf Of
> Martijn Faassen
> Sent: Montag, 24. Januar 2005 15:52
> To: silva-dev-IAPFreCvJWM6s/[email protected]
> Subject: [silva-dev] developer-level changes Silva 1.2
>
>
> Hi there,
>
> This is the developer-level changes document for Silva 1.2,
> describing
> differences from Silva 1.1 and earlier versions:
>
>  From 1.1 to 1.2:
>
> * the 'action_paste' and 'action_paste_to_ghost' methods on
> Folder have
>    a new signature, instead of returning a list of messages it now
>    returns (message_type, messages) where message_type can be
> 'feedback'
>    and 'error' and messages is the list that used to be returned.
>
> * tab_edit for VersionedContent views has changed to make use of a new
>    macro, ``macro_tab_edit/macros/editor``, instead of
>    ``macro_index/macros/master`` directly. ``macro_tab_edit`` does use
>    ``macro_index`` indirectly.
>
>    A default tab_edit is supplied in VersionedContent views.
>    SilvaDocument however overrides this with its own tab_edit.
>    You can also do in your own product.
>
>    The following slots are available in
> ``macro_tab_edit/macros/editor``:
>
>      * editor_css - add in editor-specific CSS stylesheets.
>
>      * editor_refresher - a slot to put in special refreshing code for
>        editors that are sensitive to Zope session timeouts,
> such as the
>        forms editor.
>
>      * editor_selection - add extra fields above the main
> editor content
>        area to allow the user to switch editors, such as
> between kupu and
>        the forms editor.
>
>      * editor_content - the main editor content area, showing for
>        instance the forms editor or kupu.
>
> * The public view directory layout changed due to some change
> in the way
>    we register views. For some functionality on the
>    VersionManagementAdapter, we needed to get a rendered
> version, which
>    wasn't allowed the way the views were previously set up
> (fetching the
>    version happened in the render scripts, each script would render a
>    specific version).
>
>    Changes:
>
>      * instead of registering a 'public' view for VersionedContent
>        objects, they are now registered for Version objects, the view
>        assumes
>
>      * instead of 2 scripts 'render_view' and 'render_preview' only
>        'render' is called for both view and preview, if you want to
>        make a distinction between the two, you can register a new
>        view_type called 'preview' to another subdirectory and place a
>        'render' script in that, the general pattern is that
> if you want
>        to use only 1 script you place it directly in the
>        'public/<meta_type>' directory, if you want to have seperate
>        scripts for view and preview, create a 'view' and 'preview'
>        directory in that dir ('public/<meta_type>/view' and
>        'public/<meta_type>/preview')
>
>      * the 'model' variable in the render script does not point to the
>        VersionedContent object anymore, but instead it refers to the
>        Version object (of course it still refers to the object itself
>        in case the object is not of a versioned type)
>
> Let us know if anything is unclear!
>
> Regards,
>
> Martijn
>
> _______________________________________________
> silva-dev mailing list
> silva-dev-IAPFreCvJWM6s/[email protected]
> http://lists.infrae.com/mailman/listinfo/silva-dev
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.