Question

I created a content in my Plone 4.3 site (no grok here) with the very nice Dexterity through-the-web editor. Now I'd like to customize the default view for this content.

I've read Martn Aspelli's book but the problem is that through-the-web content does'nt have a specific interface (so I can't use it to create my specific view).

Was it helpful?

Solution

If you want to do this all through-the-web, then do the following:

  1. Create a template for your view in the "custom" folder of portal_skins (through the ZMI). You'll probably want to start with a copy of something like the page template (portal_skins/plone_content/document_view). Give it a name like your_content_type_view. Test it by appending /your_content_type_view to the URL for a sample object.

  2. Edit the Factory Type Information (portal_types/your_content_type/Default view method) to be your_content_type_view.

What you will have done is create a skin-level view for the type. This is different from the browser views that Martin is discussing, which do indeed require a class. The Dexterity development team is working on a way to provide TTW maintenance of browser views, but that's for a later version of Plone.

Meanwhile, if you later transfer your Dexterity content type to a Python add on, you'll be able to use your template, possibly unmodified for a browser view.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top