On 3/27/11 8:52 PM, Andreas Jung wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi there,

in my Produce&Publish application I have a browser view where a
view I am using the formTabbing feature (<dl
class="enableFormTabbing"...) for generating a conversion section

Generate PDF | Generate PDF + HTML

In customer projects we often need to extend this tabbed view
with customer specific options like

Generate PDF | Generate PDF + HTML | My Customer conversion | ....

Is there a straight forward way to inject arbitrary tab titles and tab
contents snippets here based on something.

Viewlets are not appropriate here. Using actions is not an option (don't
provide the "tab content").

I am thinking of using named utilities here where the a utility
could provide tab title and tab contents...not sure if there is a better
way?
Or possibly use plone.app.registry, which gives you a basic UI and GS import/export for free. But, it doesn't do a great job of handling the case when you want a collection of items that all provide settings based on some schema, which is what you have here.

The named utility approach could work okay though. I recently did something like this in a branch of plone.app.dexterity, to look up actions associated with particular behaviors: http://dev.plone.org/plone/changeset/47668 (this doesn't include an analogue of your tab contents, but that's a small change). I might make it be a named adapter of the context and request (in essence a view) so that I could restrict availability to particular sites using browser layers, rather than having to register persistent utilities. But that probably only matters if you have more than one Plone site per Zope instance.


----------              
David Glick
Web Developer
davidgl...@groundwire.org
206.286.1235x32

Groundwire: You Are Connected           
http://groundwire.org           

Online tools and strategies for the environmental movement.  Sign up for 
Groundwire News!
http://groundwire.org/email-capture


_______________________________________________
Product-Developers mailing list
Product-Developers@lists.plone.org
https://lists.plone.org/mailman/listinfo/product-developers

Reply via email to