Plone 3 : Changing the title for custom Zope 3 views
Recently I needed to change the title for a custom Zope 3 view. The title is displayed in the “Display” menu, when you add the view as one of the “Available view methods” of the content type. The text shown by default is the view name (usually something like viewname_view), which is not very user-friendly.
With old skin templates, you could change the title just by adding a .metadata file or by editing it directly in the ZMI. With Zope 3 views, however, I had no idea how to do this.
So I searched and did not find much information about it, but thankfully I found this thread in the Core Developers mailing list, which is about adding this exact feature to Plone!
Here how it works :
<browser:page for="OFS.interfaces.IFolder" name="myview_view" class=".myview.View" template="templates/myview.pt" permission="zope.Public" /> <browser:menuItems for="*" menu="plone_displayviews"> <browser:menuItem title="My View Title" action="myview_view" description="Display something" /> </browser:menuItems>
Here I’m changing the title for myview_view to “My View Title”. The first XML tag is just the view registration (nothing special here). The browser:menuItems and browser:menuItem is what’s important. plone_displayviews is the name of the menu you need to change. You can add as much browser:menuItem as you want in the menuItems tag. The action parameter is what is actually making the connection between the view and the menuItem.
Thanks to Martijn Pieters, Martin Aspeli and others involved in adding this feature!

December 7th, 2008 at 1:31 pm
Nice post. Thank you for the info. Keep it up.