Direi che è il codice con cui ho customizzato plone.global_sections.<br>Ma per ora la navigazione secondaria non sbuca (ovviamente ho creato dentro portal_actions tutto il necessario).<br><br>Ecco il mio codice:<br><tal:tabs tal:condition="view/portal_tabs"<br>
i18n:domain="plone"><br> <h5 class="hiddenStructure" i18n:translate="heading_sections">Sections</h5><br><br> <ul id="portal-globalnav"><br> <tal:tabs tal:repeat="tab view/portal_tabs"><li tal:attributes="id string:portaltab-${tab/id};<br>
class python:view.selected_portal_tab==tab['id'] and 'selected' or 'plain'"><br> <a href="" <br> tal:content="tab/name"<br>
tal:attributes="href tab/url;<br> title tab/description|nothing"><br> Tab Name<br> </a><br><tal:block omit-tag=""<br> tal:define="sublevel string:portaltab-${tab/id};<br>
subnav actions/?sublevel|nothing;"><br> <tal:block omit-tag="" tal:condition="subnav"><br> <ul class="nn-twolevel-subnav"><br>
<tal:tabs tal:repeat="subtab subnav"><br> <li tal:attributes="id string:portaltab-${subtab/id};"><br> <a href="" class="" tal:attributes="href subtab/url;" accesskey="accesskeys-tabs" i18n:attributes="accesskey"><br>
<tal:block omit-tag="" i18n:translate="" ><br> <span tal:replace="subtab/name">Tab Name</span><br> </tal:block><br>
</a><br> </li><br> </tal:tabs><br> </ul><br> </tal:block><br> </tal:block><br>
<br><br><br><br><br><br></li></tal:tabs><br> </ul><br></tal:tabs><br><br><br><br><br><br><br><br><br><br><br><div class="gmail_quote">2009/1/28 Carrer Yuri <span dir="ltr"><<a href="mailto:yuri.carrer@unipd.it">yuri.carrer@unipd.it</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Fabrizio Rota ha scritto:<div class="Ih2E3d"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Su <a href="http://new.plone.org/documentation/how-to/twolevel-navigation-in-plone-revived" target="_blank">http://new.plone.org/documentation/how-to/twolevel-navigation-in-plone-revived</a><br>
c'è un sistema molto intreigante basato su porta action.<br>
Possibile adattarlo a plone 3?<br>
</blockquote>
<br></div>
Si, elimini la navigazione principale e crei in portal_tabs le tab principali e in un'altra sezione metti le sotto tab. Poi modifichi il template perchè cicli sulle sotto tab.<br>
<br>
Ecco quello che uso per un sito plone 2.5 (<a href="http://global_sections.pt" target="_blank">global_sections.pt</a>) dove le subtab hanno come category portaltab-<id_tab_principale>. Cioè se la sezione principale è pippo, le sottoazioni (secondo menù) hanno come category portaltab-pippo e appare:<br>
<br>
[pippo]<br>
[sotto pippo-1] [sotto pippo-2]<br>
<br>
<br>
=====================<br>
<br>
<br>
<html xmlns="<a href="http://www.w3.org/1999/xhtml" target="_blank">http://www.w3.org/1999/xhtml</a>" xml:lang="en" lang="en"<br>
i18n:domain="plone"><br>
<br>
<body><br>
<br>
<!-- THE SECTION TABS DEFINITION --><br>
<div metal:define-macro="portal_tabs"<br>
tal:omit-tag=""<br>
tal:define="selected_tabs python:here.selectedTabs('index_html', here, portal_tabs);<br>
selected_portal_tab selected_tabs/portal;"<br>
tal:condition="portal_tabs"><br>
<br>
<h5 class="hiddenStructure" i18n:translate="heading_sections">Sections</h5><br>
<br>
<ul id="portal-globalnav"><br>
<tal:tabs tal:repeat="tab portal_tabs"><li tal:attributes="id string:portaltab-${tab/id};<br>
class python:test(selected_portal_tab==tab['id'], 'selected', 'plain');"><br>
<br>
<a href=""<br>
tal:content="tab/name"<br>
tal:attributes="href tab/url;<br>
title tab/description|nothing;<br>
class string:actionicon-portaltab-${tab/id}"><br>
Tab Name<br>
</a><br>
</li><br>
</tal:tabs><br>
</ul><br>
<tal:tabs tal:repeat="tab portal_tabs"><br>
<tal:block omit-tag=""<br>
tal:define="selected_tabs python:here.selectedTabs('index_html', here, portal_tabs);<br>
selected_portal_tab selected_tabs/portal;<br>
sublevel string:portaltab-${tab/id};<br>
subnav actions/?sublevel|nothing;"><br>
<tal:block omit-tag="" tal:condition="subnav"><br>
<ul tal:condition="python:test(selected_portal_tab==tab['id'], 1, 0)" id="portal-globalsubnav"><br>
<tal:tabs tal:repeat="subtab subnav"><br>
<li tal:on-error="nothing" tal:attributes="id string:portaltab-${subtab/id};<br>
class python:test(subtab['id']==here['id'], 'selected', 'plain');"><br>
<br>
<a href="" class=""<br>
tal:attributes="href subtab/url;"<br>
accesskey="accesskeys-tabs" i18n:attributes="accesskey"><br>
<br>
<tal:block omit-tag="" i18n:translate="" ><br>
<span tal:replace="structure subtab/name">Tab Name</span><br>
</tal:block><br>
</a><br>
</li><br>
</tal:tabs><br>
</ul><br>
</tal:block><br>
</tal:block><br>
</tal:tabs><br>
<br>
</div><br>
<br>
</body><br>
</html><br>
<br>
<br>
<br>
=====================<br>
<br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
faber<br>
<br>
2009/1/28 Fabrizio Rota <<a href="mailto:fabrizio.rota@gmail.com" target="_blank">fabrizio.rota@gmail.com</a> <mailto:<a href="mailto:fabrizio.rota@gmail.com" target="_blank">fabrizio.rota@gmail.com</a>>><div class="Ih2E3d">
<br>
<br>
Utilizza le keyword sulla cartella, in questo modo puoi<br>
"taggare" le cartelle che vuoi/non vuoi mettendo/togliendo una<br>
parola chiave sulla cartella.<br>
<br>
Questo sarebbe il massimo, ma non so davvero come referenziare le<br>
parole chiave in una espressione python (in pratica NON SO NULLA<br>
DI PYTHON - e pure di molte altre cose).<br>
<br>
E poi c'è una seconda faccenda: così come è fatto il prodotto<br>
lista in sottonavigazione anche i files, non solo le cartelle<br>
(l'ho notato adesso)!<br>
<br>
E' possibile adattarlo alla visualizzazione delle sole cartelle?<br>
(ad esempio modificando<br>
<br>
navbarobjects python: navbardata['contents']; navbarselected<br>
python: navbardata['selected'];"<br>
)?<br>
<br>
faber<br>
<br>
Io, invece, ho usato un altro approccio, cioè uso<br>
portal-action e una convenzione sui nomi, per gestire<br>
navigazione principale e sottonavigazione perché non c'era una<br>
necessaria corrispondenza tra nomi e cartelle alla navigazione.<br>
<br>
Se il sito è complesso conviene adottare la strategia della<br></div>
doppia skin (<a href="http://admin.sito.com" target="_blank">admin.sito.com</a> <<a href="http://admin.sito.com" target="_blank">http://admin.sito.com</a>> e<br>
<a href="http://www.sito.com" target="_blank">www.sito.com</a> <<a href="http://www.sito.com" target="_blank">http://www.sito.com</a>>), uno per gestire i<div class="Ih2E3d"><br>
contenuti e l'altro per visualizzarli.<br>
Il primo ha una skin di default e ti muovi nella logica di<br>
immettere il contenuto, il secondo ha uno skin "figo" e con la<br>
logica della ricerca e visualizzazione del contenuto.<br>
<br>
<br>
<br>
-- Faber<br>
--------------------<br>
<br>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Plone-IT mailing list<br></div>
<a href="mailto:Plone-IT@lists.plone.org" target="_blank">Plone-IT@lists.plone.org</a> <mailto:<a href="mailto:Plone-IT@lists.plone.org" target="_blank">Plone-IT@lists.plone.org</a>><div class="Ih2E3d">
<br>
<a href="http://lists.plone.org/mailman/listinfo/plone-it" target="_blank">http://lists.plone.org/mailman/listinfo/plone-it</a><br>
<a href="http://www.nabble.com/Plone---Italy-f21728.html" target="_blank">http://www.nabble.com/Plone---Italy-f21728.html</a><br>
<br>
<br>
<br>
_______________________________________________<br>
Plone-IT mailing list<br></div>
<a href="mailto:Plone-IT@lists.plone.org" target="_blank">Plone-IT@lists.plone.org</a> <mailto:<a href="mailto:Plone-IT@lists.plone.org" target="_blank">Plone-IT@lists.plone.org</a>><div class="Ih2E3d"><br>
<a href="http://lists.plone.org/mailman/listinfo/plone-it" target="_blank">http://lists.plone.org/mailman/listinfo/plone-it</a><br>
<a href="http://www.nabble.com/Plone---Italy-f21728.html" target="_blank">http://www.nabble.com/Plone---Italy-f21728.html</a><br>
<br>
<br>
<br>
<br>
-- Fabrizio<br>
--------------------<br>
"Life is what happens to you while you're busy making other plans"<br>
- J. Lennon<br>
<br>
<br>
<br>
<br>
-- <br>
Fabrizio<br>
--------------------<br>
"Life is what happens to you while you're busy making other plans" - J. Lennon<br></div><div class="Ih2E3d">
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
Plone-IT mailing list<br>
<a href="mailto:Plone-IT@lists.plone.org" target="_blank">Plone-IT@lists.plone.org</a><br>
<a href="http://lists.plone.org/mailman/listinfo/plone-it" target="_blank">http://lists.plone.org/mailman/listinfo/plone-it</a><br>
<a href="http://www.nabble.com/Plone---Italy-f21728.html" target="_blank">http://www.nabble.com/Plone---Italy-f21728.html</a><br>
</div></blockquote><font color="#888888">
<br>
<br>
-- <br>
Yuri Carrer<br>
<br>
CAB - Centro di Ateneo per le Biblioteche</font><div><div></div><div class="Wj3C7c"><br>
<br>
<br>
_______________________________________________<br>
Plone-IT mailing list<br>
<a href="mailto:Plone-IT@lists.plone.org" target="_blank">Plone-IT@lists.plone.org</a><br>
<a href="http://lists.plone.org/mailman/listinfo/plone-it" target="_blank">http://lists.plone.org/mailman/listinfo/plone-it</a><br>
<a href="http://www.nabble.com/Plone---Italy-f21728.html" target="_blank">http://www.nabble.com/Plone---Italy-f21728.html</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Fabrizio<br>--------------------<br>"Life is what happens to you while you're busy making other plans" - J. Lennon<br>