Restrict view to just one folder

Hi,
I'm working on bobtemplates.plone to add view subtemplates. View subtemplate is almost finished but I'm stuck in one problem to have a view specific to just one folder.
For example http://localhost:8080/Plone/news/my-view should not show anything
But for http://localhost:8080/Plone/my-folder/my-view it should show the view.
The view is pretty simple - a template and a python class.
with this configuration :point_down:

<browser:page
     name="my-view"
     for="Products.CMFCore.interfaces.IFolderish"
     class=".my_view.MyView"
     template="my_view.pt"
     permission="zope2.View"
     />

You can not register a view by path...either you add additonal checks based on some criteria with your view class or assign a dedicated marker interface for this particular folder and register the view for this marker interface.

1 Like

Yeah, It just occurred to me after posting this. Thanks for help!