Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Navigation portlet non-site root node icon renders in navigation.pt #2

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGES.txt
Expand Up @@ -4,6 +4,10 @@ Changelog
2.2.2 - Unreleased
------------------

- Navigation portlet template renders a non-site navigation root content
item with its apporpriate content icon, reserving the Plone site icon
CSS sprite for default use by a site only. [seanupton]

- Fixed issue where the events, news and recent portlet would fail
with a setting of no items (zero) shown due to a catalog sorting
assertion.
Expand Down
11 changes: 7 additions & 4 deletions plone/app/portlets/portlets/navigation.pt
Expand Up @@ -19,15 +19,18 @@
li_class python:selectedClass and ' navTreeCurrentNode' or '';"
tal:condition="view/include_top"
tal:attributes="class string:navTreeItem navTreeTopNode${li_class}">
<div tal:define="rootIsPortal view/root_is_portal;">
<div tal:define="rootIsPortal view/root_is_portal;
siteclass python:rootIsPortal and 'contenttype-plone-site ' or '';">
<a tal:attributes="href root/absolute_url;
title root/Description;
class string:contenttype-plone-site $selectedClass;">
class string:${siteclass}${selectedClass};">
<span tal:omit-tag=""
tal:condition="rootIsPortal"
i18n:translate="tabs_home">Home</span>
<span tal:condition="not:rootIsPortal"
tal:replace="root/Title">Root item title</span>
<tal:block condition="not:rootIsPortal">
<img width="16" height="16" src="" alt="" tal:attributes="src view/root_icon; alt root/Title" />
<span tal:replace="root/Title">Root item title</span>
</tal:block>
</a>
</div>
</li>
Expand Down