Netsight Blog

Cool stuff Netsight are up to in Zope and Plone

Avatar

Folder Contents Appending '/view' To Some URLs

written by Ben Ackland, on May 27, 2009 10:16:00 AM.

In a standard (Plone 3.1) site, when you go to folder contents, any Images and Files that are included in the listing automatically have "/view" appended to their hyperlink (so that you get the content view rather than the raw data). If you subclass ATImage, you don't get this by default which causes problems for content creators (they click on an Image and can't get to the "edit" tab).

The solution is to add your custom types to the site properties field "typesUseViewActionInListings".

The folder_contents template (code defined in plone/app/content/browser/foldercontents.py) uses this to determine which URLs to append '/view' on to.

Comments

  • I'm supposing it is a good idea to add typeUseViewActionInListings values to propertiestool.xml in the profile of the product containing your custom content type. In the good old days, I remember having to add this as yet another scripted thing to do for the quickinstaller. I am not clear if/how Generic Setup merges values in propertiestool.xml though with existing values for that property.

    Sean

    Comment by Sean Upton — May 27, 2009 5:26:59 PM | # - re

Leave a Reply