plone/plone.app.portlets — pull request #2 by seanupton (2011-10-12 19:12:05+00:00)
Title: Navigation portlet non-site root node icon renders in navigation.pt

Refs: https://dev.plone.org/plone/ticket/12276

The set of changes in proposed merge from my fork: (a) navigation.pt now renders a non-site navigation root navtree node with a content icon using root_icon() method already defined in navigation.py (this likely predates Plone 4, and is previously unused in Plone 4, but seems convenient and correct); (b) CHANGES.txt updated accordingly.

For normal plone site roots, the standard site icon sprite is used. The site icon makes much less sense in other navigation root contexts, though.

Rationale: sites using explicit navigation root strategies -- where a content item (folder) provides INavigationRoot for a lightweight sub-site like setup -- will, more often than not, want to keep the content icon for that item as root node icon in the navigation portlet [1]. The current use of a plone site icon sprite (via CSS) is only reasonable for a site. This change provides a more reasonable default for icon behavior than the status quo, and does not exclude integrators wanting to keep the old behavior of a site icon from registering an IContentIcon multi-adapter for that very purpose with just a few lines of ZCML (normal icon, not a sprite).

I posted to plone-developers seeking comments from anyone using sub-sites about this change.

Sean

[1] By way of example, my "sub-site" (groupware workspace acting as a nav root) uses a "home folder" icon, which is less visually ambiguous than using the site icon, especially for users who traverse more than one navigation root in the site (we have a link to the site root in a viewlet for this purpose).