mi è piaciuto entrambe le proposte, ma ho finito per fare la seguente (perché non riuscivo a vedere come fare tutto quello che volevo con gli altri suggerimenti):
<browser:viewlet
name="trueblade.phoenix.footer2"
manager="plone.app.layout.viewlets.interfaces.IPortalFooter"
class=".footer2.MyGlobalSectionsViewlet"
template="footer2.pt"
permission="zope2.View"
/>
Con footer2.py come questo (sottoclasse e nient'altro):
from plone.app.layout.viewlets.common import GlobalSectionsViewlet
class MyGlobalSectionsViewlet(GlobalSectionsViewlet):
pass
E footer2.pt come questo (tutto lo stesso, ma l'id CSS):
<tal:sections tal:define="portal_tabs view/portal_tabs"
tal:condition="portal_tabs"
i18n:domain="plone">
<h5 class="hiddenStructure" i18n:translate="heading_sections">Sections</h5>
<ul id="footer2"
tal:define="selected_tab python:view.selected_portal_tab"
><tal:tabs tal:repeat="tab portal_tabs"
><li tal:define="tid tab/id"
tal:attributes="id string:portaltab-${tid};
class python:selected_tab==tid and 'selected' or 'plain'"
><a href=""
tal:content="tab/name"
tal:attributes="href tab/url;
title tab/description|nothing;">
Tab Name
</a></li></tal:tabs></ul>
</tal:sections>
e CSS come questo (per visualizzare footer2 solo sulla prima pagina):
#footer2 {
display: none;
}
.section-front-page #footer2 {
display: block;
margin: 1em;
}
E Naturalmente, una copia degli stili piè di pagina di default per footer2:
#footer2 {
clear: both;
font-size: 80%;
background: #ddd;
/* ensure top navigation dont touches portlets, content etc.. #10491 */
margin: 0 0 1em 0;
text-align: center;
}
#footer2 li {
}
#footer2 li a {
display: inline-block;
padding: 0.5em 1em 2em 1em;
background: #ddd;
min-width: 6em;
white-space: normal;
/*TODO: Once we have removed the whitespace from the nav template, this can be put back*/
/*border-bottom: 0.1em solid White;*/
border-right: 0.1em solid white;
}
#footer2 .selected a,
#footer2 a:hover {
background: #205c90;
color: White;
}
#footer2 .selected a:hover {
background: #ddd;
color: #205c90;
}
Mi piace questo, ma sto già nascondendo # portal-globalnav con CSS, il che significa che ora sto nascondendo due # portal-globalnavs :-). Sono aperto a rilasciare i bit CSS, se questo aiuta. Sospetto che la risposta potrebbe implicare un mix tra la tua risposta e quella di Ross. – aclark