folder_listing is inconsistent
Duncan Booth <duncan.booth-+q9EdC6cpuuCZ5vHv/[email protected]> Tue, 17 Aug 2004 13:50:57 +0000 (UTC)
| Newsgroups | gmane.comp.web.zope.plone.design |
|---|---|
| Message-ID | <[email protected]> |
The default page generated for folders (i.e. the folder_listing macro) is inconsistent and therefore confusing. The page generates two links for each item: one on the icon, and another on the title. * For Image objects, the icon link shows you the raw image, while the title link shows you the image in the context of the site (i.e. the view action). * For Link objects, the icon link shows you the plone view of the link while the title link goes directly to the link target (effectively the reverse of the case for images) * For File objects, both links show you the raw contents of the file. There is no link to the view action. * for other content types the default url takes you to the view action, so this appears to be the opposite behaviour from File objects. This is confusing for end-users and it seems to me that it ought to be possible to produce something more intuitive. Also there is a problem if you introduce new content types (e.g. ATContentTypes) as they won't have the expected behaviour for types similar to Image or Link. One simple change would be to make the icon go directly to the object's URL, and the title link point to the view action. This would remove the special-casing for images so that new image types would be handled consistently. It would also remove the apparent discrepancy in the handling of File objects. I'm not so sure about the special handling of links. Again it is hard-wired to the portal_type, so there is no easy way to get the same handling for additional link-style types. One option would be to make the title link to "obj/getRemoteUrl" when possible, the view action if it exists, or the object url if all else fails. This still leaves the behaviour of links apparently the reverse of that for images, but it seems to be the most sensible way to handle links: perhaps all content objects should have the icon link to the view action and the title link point to obj/getRemoteUrl|obj/absolute_url for ultimate consistency. Thoughts anyone? ------------------------------------------------------- SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285