To get a one-time view in the Plone folder, I do something like this (not all the code):
In configure.zcml :
<interface interface=".interfaces.IMySpecialFolder" />
In browser/configure.zcml :
<browser:page for="..interfaces.IMySpecialFolder" name="special" template="special.pt" permission="zope2.View" />
This works fine, but I would like to manage the folder display menu to only display my special view. I can add it, and it only appears in my marked folder, but I need to change ATFolder FTI to the whole site.
In browser/configure.zcml :
<include package="plone.app.contentmenu" /> <browser:menuItem for="..interfaces.IMySpecialFolder" menu="plone_displayviews" title="Special view" action="@@special" description="Special case folder view" />
In profiles/default/types/Folder.xml :
<?xml version="1.0"?> <object name="Folder"> <property name="view_methods" purge="False"> <element value="special"/> </property> </object>
Of course, I cannot delete the existing browsing methods available without affecting every folder on the site.
Is there a way to make this a one-time menu display without changing the type of FTI content?
In fact, it seems this problem has been resolved before. p4a.z2utils patches CMFDynamicViewFTI to get a list of available views from the IDynamicallyViewable adapter IDynamicallyViewable . ( dateable.chronos uses this mechanism for its folder calendar views). So my question is:
Is there a way to make this a one-time menu display without changing the type of FTI content and without correcting Plone?
source share