If you're using grok directives, this is a lot easier in dexterity: you just
create a class named "View" derived from grok.View, put in a couple of
directives to assign context and permissions, then create a view.pt template
in a yourcontenttype_templates folder. Since you don't touch the setup
profile, you don't need to reinstall.

There's an example of this created with new content types in
zopeskel.dexterity 1.3b1 -- just posted to PyPI recently.

On Mon, May 9, 2011 at 11:22 AM, Mikko Ohtamaa <mi...@redinnovation.com>wrote:

> Hi,
>
> A very common use pattern is to set a default view for a custom
> created content. It's not especially straightforward task as you need
> to 1) create the view, register it against a content interface, in my
> case this goes to views.py 2) poke types.xml in two places 3)
> reinstall add-on
>
> Would it make sense to create a zopskel.dexterity command doing this
> for (excluding reinstall, of course, but would give a message about
> it)
>
> ... or does Dexterity hold another pattern to solve this?
>
> --
> Mikko Ohtamaa
> mFabrik - Freedom Delivered.
>
> Web and Mobile for Plone - http://webandmobile.mfabrik.com
> Blog - http://blog.mfabrik.com
> _______________________________________________
> ZopeSkel mailing list
> zopes...@lists.plone.org
> https://lists.plone.org/mailman/listinfo/plone-zopeskel
>
_______________________________________________
ZopeSkel mailing list
zopes...@lists.plone.org
https://lists.plone.org/mailman/listinfo/plone-zopeskel

Reply via email to