In the past, I could go to portal_view_customization/navigation.pt and remove the sitemap link:
<dt class="portletHeader">
<span class="portletTopLeft"></span>
<a href="#"
class="tile"
tal:condition="not:view/title"
tal:attributes="href string:${root/absolute_url}/sitemap"
i18n:translate="box_navigation">Navigation</a>
<a href="#"
class="tile"
tal:condition="view/title"
tal:attributes="href string:${root/absolute_url}/sitemap"
tal:content="view/title">Navigation</a>
<span class="portletTopRight"></span>
</dt>
In Plone 5, when I go to portal_view_customizaton/navigation.pt, I no longer see that sitemap link. Where is it in Plone 5 now so that I can change it from href string:${root/absolute_url}/sitemap
to
href string:${root/absolute_url}/
as I could do so before?
Any help would be most appreciated. Thank you.
tkimnguyen
(T. Kim Nguyen)
March 10, 2018, 1:58pm
3
gp54321:
@@actions-controlpanel ?
I don't think those actions are used in a navigation portlet
tkimnguyen
(T. Kim Nguyen)
March 10, 2018, 2:02pm
4
Looks like there was some smarter logic encoded to determine what that sitemap link should do:
of the sitemap of the navigation root.
Plone does not have subsection sitemaps so there is no point of
displaying /sitemap links for anything besides nav root.
"""
if not self.data.root_uid and not self.data.currentFolderOnly:
# No particular root item assigned -> should get link to the
# navigation root sitemap of the current context acquisition chain
portal_state = getMultiAdapter((self.context, self.request), name="plone_portal_state")
return portal_state.navigation_root_url() + "/sitemap"
nav_root = self.getNavRoot()
# Root content item gone away or similar issue
if not nav_root:
return None
if INavigationRoot.providedBy(nav_root) or ISiteRoot.providedBy(nav_root):
# For top level folders go to the sitemap
return nav_root.absolute_url() + "/sitemap"
tkimnguyen
(T. Kim Nguyen)
March 10, 2018, 2:05pm
5
Has it just changed names? What do you see in portal_view_customizaton/navigation.pt now?
I think you can change this behaviour in the edit form of the navigation portlet in the Plone UI , if I get you right.
This is what I see on my navigation.pt in portal_view_customization. It is completely different from what it used to be:
<tal:block i18n:domain="plone">
<header class="portletHeader"
tal:attributes="class python:view.hasName() and 'portletHeader' or 'portletHeader hiddenStructure'">
<a href="#"
class="tile"
tal:attributes="href string:${view/heading_link_target}"
tal:content="view/title"
i18n:translate="">Navigation</a>
</header>
<nav class="portletContent lastItem">
<ul class="navTree navTreeLevel0">
<li tal:define="selectedClass view/root_item_class;
li_class python:selectedClass and ' navTreeCurrentNode' or '';
normalizeString nocall:context/plone_utils/normalizeString;
section_title root/Title;
section python:normalizeString(section_title);"
tal:condition="view/include_top"
tal:attributes="class string:navTreeItem navTreeTopNode${li_class} nav-section-${section}">
<div tal:define="rootIsPortal view/root_is_portal;
root_icon view/root_icon;
root_type root/portal_type;
root_type_class python:'contenttype-' + normalizeString(root_type);
root_class python:rootIsPortal and 'contenttype-plone-site' or root_type_class;">
<a tal:attributes="href root/absolute_url;
title root/Description;
class python:' '.join([root_class, selectedClass]).strip();">
<img tal:replace="structure root_icon/html_tag" tal:condition="not:rootIsPortal" />
<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>
</a>
</div>
</li>
<li tal:replace="structure view/createNavTree">
SUBTREE
</li>
</ul>
</nav>
In Plone 4, it was much simpler and I could delete /sitemap from it:
<dt class="portletHeader">
<span class="portletTopLeft"></span>
<a href="#"
class="tile"
tal:condition="not:view/title"
tal:attributes="href string:${root/absolute_url}/sitemap"
i18n:translate="box_navigation">Navigation</a>
<a href="#"
class="tile"
tal:condition="view/title"
tal:attributes="href string:${root/absolute_url}/sitemap"
tal:content="view/title">Navigation</a>
<span class="portletTopRight"></span>
</dt>
Pertaining to heading link target, where do I go to change it?
tal:attributes="href string:${view/heading_link_target}"
This is what I have for my About Us section navigation portlet:
Title: About Us
Root node: Blank
Include top node: Unchecked
Only show the contents of the current folder: Unchecked
Start level: 1
Navigation tree depth: 2
If I choose a folder to act as root node, the navigation menu does not appear at all.