I have been asked to enable the following behavior: - file items in a folder listing should be linked to using the default view (i.e. not '/view'), so that if they are, say, a PDF, the browser's PDF plugin gets invoked and is file is viewed directly.
Ok, that's easily accomplished by just removing File from the 'typesUseViewActionInListings' list in portal_properties/site_properties. However -- content authors have now lost the only easy means with which to access the '/view' template for file items, making it cumbersome and arcane to edit file items, because they never see the view that offers them the 'edit' action tab. Basically, they have to know that they can manually append '/view' or '/edit' to the item's URL to get to those screens. My thought was to customize the folder_contents view so that it always offered up the '/view' URL for file items. So when an author wants to edit or manage a file item, they click 'contents' for its parent folder, and then just click the item in that listing. In other words -- the folder_contents view provides a more administratively-minded listing of the folder's contents (which it already does by allowing reordering, copy-n-paste, etc..). Since folder_contents uses the same typesUseViewActionInListings list as the other folder templates, I either have to: a) create a customized version of folder_contents that uses a different site_property list (something like 'typesUseViewActionInContentListings'), and create that property and populate it with at least 'File'. OR b) customize every other known view of folders to _NOT_ use typesUseViewActionInListings for File items, and instead always indiscriminately use the default view URL for files. (a) seems like the cleaner approach, but I wanted to solicit opinions on whether I'm thinking of this correctly. Maybe there's a silly simple way to get what I want without the trouble of a full custom version of the folder_contents view (which is pretty heavy-weight, and I'd basically be touching one line in a mirrored version of plone/app/content/browser/foldercontents.py). Thanks in advance for any advice/help. -hoss David Hostetler [email protected]
_______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
