[Product-Developers] Change "default view" and get it active quickly?

Enrique Pérez Arnaud eperez at yaco.es
Wed Aug 10 13:14:57 UTC 2011


Hi,

2011/8/10 vii <v.errath at bcom.at>:

>
> I created a folderish CT "NewBornGallery" (with paster). For the content of
> this folder I created a "normal" CT "NewBornBaby" (also with paster). I
> changed the baseCT of the NewBornBaby to ATImage. I added the fields and
> wigdets I needed and eventhing is fine. Now I want to create my own views
> and used paster to create these. After a lot of "try and error" I noticed
> that I have to fill in the choosen view in the
> "profiles/default/types/NewBornGallery.xml" in the property "default_view".

If you don't touch NewBornGallery.xml, your default_view will be
base_view (Products/Archetypes/skins/archetypes/base_view.pt). Take a
look at that template, if you name your intended default_view
"newbornbaby_view", base_view will be able to pick it up (provided you
put your markup in a "body" macro).

> Did I missed this hint in all the books and tutorials? Or should paster
> create this entry??

paster cannot know.

>
> Is there an easier way to get this settings active than to de-install and
> install the product? (plone.reload does not work right??)

You can just run the "Types Tool" import step in the import tab in the
portal_setup tool (zmi) (don't forget to select your extension profile
first).

You can also directly edit the fti for your type in the portal_types
tool (again, zmi). If you do this, do not forget to also record the
changes in your generic setup profile (this would be
profiles/default/types/NewBornGallery.xml).

>
> regards
> viktor
>
> --
> View this message in context: http://plone.293351.n2.nabble.com/Change-default-view-and-get-it-active-quickly-tp6672176p6672176.html
> Sent from the Product Developers mailing list archive at Nabble.com.
> _______________________________________________
> Product-Developers mailing list
> Product-Developers at lists.plone.org
> https://lists.plone.org/mailman/listinfo/plone-product-developers
>



-- 
Enrique Pérez Arnaud
Yaco Sistemas S.L. | http://www.yaco.es
C/ Rioja 5, 41001 Sevilla (España)
Teléfono: (+34) 954 50 00 57 | Fax (+34) 954 50 09 29


More information about the Product-Developers mailing list