Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6474477
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T06:35:29+00:00 2026-05-25T06:35:29+00:00

To get a one-off view on a Plone folder I do something like this

  • 0

To get a one-off view on a Plone folder I do something like this (not all code shown):

In configure.zcml:

<!-- Marker interface. Set this on the folder through the ZMI
     interfaces tab.
  -->
<interface interface=".interfaces.IMySpecialFolder" />

In browser/configure.zcml:

<!-- Special case view. Set as the folder's view through the ZMI
     properties tab (layout property).
  -->
<browser:page
  for="..interfaces.IMySpecialFolder"
  name="special"
  template="special.pt"
  permission="zope2.View"
  />

This works great, but I would like to control the folder’s display menu to list only my special case view. I can add it, and it shows up only on my marked folder, but I have to change the site-wide ATFolder FTI.

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 remove the existing available view methods without affecting every folder on the site.

Is there a way to do this one-off display menu tweaking without changing a content type’s FTI?

Actually, it seems like this problem has been tackled before. p4a.z2utils patches CMFDynamicViewFTI to get the list of available views from an IDynamicallyViewable adapter lookup. (dateable.chronos uses this mechanism for its folder calendar views). So my question becomes:

Is there a way to do this one-off display menu tweaking without changing a content type’s FTI and without patching Plone?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T06:35:30+00:00Added an answer on May 25, 2026 at 6:35 am

    Answering my own question, I’ve realised that the most straightforward way to achieve one-off folder views is to follow the pattern Plone itself applies in the Members folder: a PythonScript index_html that calls the custom view, e.g.

    member_search=context.restrictedTraverse('member_search_form')
    return member_search()
    

    Products.CMFPlone illustrates how to setup such a PythonScript with a GenericSetup import handler.

    In retrospect I realise I didn’t need the marker interface in my question scenario. It’s not necessary here in the answer either.

    Note that this solution doesn’t result in “the folder’s display menu listing only my special case view” as I asked, but does away with the display menu altogether. I’m fine with that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

With this code, I am able to return one image based off of a
How does one get a list of running applications as shown in the "Applications"
One can get the text of the selected item in the list-view of a
I use this code to get the item from cursor, but it just return
I want to create an android activity that looks like the one below this.
I'm drawing three rectangles, one of which falls off the end of the view,
I want to get one record before start date and end date DtpFrom means
I need to get one page (can be cURL, or filegetcontent), get some info
Very basic question - how to get one value from a generator in Python?
I tried to make an independent copy of an array but couldnt get one.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.