[Plone-IT] subnav

Fabrizio Rota fabrizio.rota a gmail.com
Gio 29 Gen 2009 16:46:13 UTC


Grazie Yuri!
Proprio poco fa ho visto una skin di quintagroup ("estate") con la
navigazione che mi serviva (ma con codice chiuso).
Ed ora ecco il prodotto su cui probabilmente la skin si basa!

Comunque non ho ancora capito perchè il codice basato su portal action non
funzioni con plone 3.....
L'ho provato con plone 2.5 e funziona out-of-the-box... Bello, lineare,
perfetto!
Sarà che in plone 3 la sezione portal actions è strutturata in modo
diverso... mah!
Vediamo questo prodotto: inutile reinventare la ruota!

faber

Il giorno 29 gennaio 2009 15.40, Yuri <yurj a alfa.it> ha scritto:

> http://plone.org/products/qsilogroup
>
> Navigation of the site can be organized in different ways. In most cases
> navigation menu is generated on the basis of folder and page titles.
> qSiloGroup makes it possible to generate navigation menu titles (different
> from those that are generated on the basis of folder and page titles), hide
> them or make visible.  Custom navigation titles are sometimes desirable  for
> Search engine optimization (SEO)
>
> Qui ci sono altri spunti su come modificare/attivare i menù.
>
> Yuri ha scritto:
>
>  Fabrizio Rota ha scritto:
>>
>>>
>>>
>>> 2009/1/28 Yuri <yurj a alfa.it <mailto:yurj a alfa.it>>
>>>
>>>    Fabrizio Rota ha scritto:
>>>
>>>        Direi che è il codice con cui ho customizzato
>>>        plone.global_sections.
>>>        Ma per ora la navigazione secondaria non sbuca (ovviamente ho
>>>        creato dentro portal_actions tutto il necessario).
>>>
>>>
>>>    prova a stampare i valori all'interno dei cicli tal:repeat.
>>>
>>> Ehm.... lo dico piano.... non saprei come fare!
>>>
>>
>> aggiungi <span tal:content="subnav" /> dopo
>> <tal:block omit-tag=""
>>                        tal:define="sublevel string:portaltab-${tab/id};
>>                                    subnav actions/?sublevel|nothing;">
>>
>>
>>
>>>
>>>    Hai reso le action visibili? Io mio è molto simile a quello che
>>>    trovi nell'how-to. Attento agli id delle categorie.
>>>
>>> questo invece l'ho fatto.
>>> Proverò a vedere gli id delle categorie.....
>>> Il tuo metodo per il prodotto subnav, invece, sembra funzionare. Ma mi
>>> sembra meglio l'approccio portal action!
>>>
>>>
>>>
>>>
>>>        Ecco il mio codice:
>>>        <tal:tabs tal:condition="view/portal_tabs"
>>>                 i18n:domain="plone">
>>>           <h5 class="hiddenStructure"
>>>        i18n:translate="heading_sections">Sections</h5>
>>>
>>>           <ul id="portal-globalnav">
>>>               <tal:tabs tal:repeat="tab view/portal_tabs"><li
>>>        tal:attributes="id string:portaltab-${tab/id};
>>>                                   class
>>>        python:view.selected_portal_tab==tab['id'] and 'selected' or
>>>        'plain'">
>>>                   <a href=""
>>>                      tal:content="tab/name"
>>>                      tal:attributes="href tab/url;
>>>                                      title tab/description|nothing">
>>>                   Tab Name
>>>                   </a>
>>>        <tal:block omit-tag=""
>>>                                 tal:define="sublevel
>>>        string:portaltab-${tab/id};
>>>                                             subnav
>>>        actions/?sublevel|nothing;">
>>>                           <tal:block omit-tag="" tal:condition="subnav">
>>>                           <ul class="nn-twolevel-subnav">
>>>                              <tal:tabs tal:repeat="subtab subnav">
>>>                              <li tal:attributes="id
>>>        string:portaltab-${subtab/id};">
>>>                                 <a href="" class=""
>>>        tal:attributes="href subtab/url;" accesskey="accesskeys-tabs"
>>>        i18n:attributes="accesskey">
>>>                                    <tal:block omit-tag=""
>>>        i18n:translate="" >
>>>                                        <span
>>>        tal:replace="subtab/name">Tab Name</span>
>>>                                    </tal:block>
>>>                                  </a>
>>>                               </li>
>>>                               </tal:tabs>
>>>                            </ul>
>>>                            </tal:block>
>>>                       </tal:block>
>>>
>>>
>>>
>>>
>>>
>>>
>>>        </li></tal:tabs>
>>>           </ul>
>>>        </tal:tabs>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>        2009/1/28 Carrer Yuri <yuri.carrer a unipd.it
>>>        <mailto:yuri.carrer a unipd.it> <mailto:yuri.carrer a unipd.it
>>>        <mailto:yuri.carrer a unipd.it>>>
>>>
>>>
>>>           Fabrizio Rota ha scritto:
>>>
>>>               Su
>>>
>>> http://new.plone.org/documentation/how-to/twolevel-navigation-in-plone-revived
>>>               c'è un sistema molto intreigante basato su porta action.
>>>               Possibile adattarlo a plone 3?
>>>
>>>
>>>           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.
>>>
>>>           Ecco quello che uso per un sito plone 2.5
>>>        (global_sections.pt <http://global_sections.pt>
>>>           <http://global_sections.pt>) 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:
>>>
>>>           [pippo]
>>>           [sotto pippo-1] [sotto pippo-2]
>>>
>>>
>>>           =====================
>>>
>>>
>>>           <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
>>>        lang="en"
>>>               i18n:domain="plone">
>>>
>>>           <body>
>>>
>>>           <!-- THE SECTION TABS DEFINITION -->
>>>           <div metal:define-macro="portal_tabs"
>>>              tal:omit-tag=""
>>>              tal:define="selected_tabs
>>>           python:here.selectedTabs('index_html', here, portal_tabs);
>>>                          selected_portal_tab selected_tabs/portal;"
>>>              tal:condition="portal_tabs">
>>>
>>>             <h5 class="hiddenStructure"
>>>           i18n:translate="heading_sections">Sections</h5>
>>>
>>>             <ul id="portal-globalnav">
>>>                 <tal:tabs tal:repeat="tab portal_tabs"><li
>>>           tal:attributes="id string:portaltab-${tab/id};
>>>                                     class
>>>           python:test(selected_portal_tab==tab['id'], 'selected',
>>>        'plain');">
>>>
>>>                     <a href=""
>>>                        tal:content="tab/name"
>>>                        tal:attributes="href tab/url;
>>>                                        title tab/description|nothing;
>>>                                        class
>>>           string:actionicon-portaltab-${tab/id}">
>>>                     Tab Name
>>>                     </a>
>>>                   </li>
>>>                 </tal:tabs>
>>>            </ul>
>>>           <tal:tabs  tal:repeat="tab portal_tabs">
>>>           <tal:block omit-tag=""
>>>                 tal:define="selected_tabs
>>>           python:here.selectedTabs('index_html', here, portal_tabs);
>>>                 selected_portal_tab selected_tabs/portal;
>>>                 sublevel string:portaltab-${tab/id};
>>>                 subnav actions/?sublevel|nothing;">
>>>                             <tal:block omit-tag=""
>>>        tal:condition="subnav">
>>>                             <ul
>>>           tal:condition="python:test(selected_portal_tab==tab['id'],
>>>        1, 0)"
>>>           id="portal-globalsubnav">
>>>                                <tal:tabs tal:repeat="subtab subnav">
>>>                                <li tal:on-error="nothing"
>>>        tal:attributes="id
>>>           string:portaltab-${subtab/id};
>>>                                    class
>>>           python:test(subtab['id']==here['id'], 'selected', 'plain');">
>>>
>>>                                   <a href="" class=""
>>>                                     tal:attributes="href subtab/url;"
>>>                                     accesskey="accesskeys-tabs"
>>>           i18n:attributes="accesskey">
>>>
>>>                                      <tal:block omit-tag=""
>>>        i18n:translate="" >
>>>                                          <span tal:replace="structure
>>>           subtab/name">Tab Name</span>
>>>                                      </tal:block>
>>>                                    </a>
>>>                                 </li>
>>>                                 </tal:tabs>
>>>                              </ul>
>>>                              </tal:block>
>>>                         </tal:block>
>>>           </tal:tabs>
>>>
>>>           </div>
>>>
>>>           </body>
>>>           </html>
>>>
>>>
>>>
>>>           =====================
>>>
>>>
>>>
>>>
>>>               faber
>>>
>>>               2009/1/28 Fabrizio Rota <fabrizio.rota a gmail.com
>>>        <mailto:fabrizio.rota a gmail.com>
>>>               <mailto:fabrizio.rota a gmail.com
>>>        <mailto:fabrizio.rota a gmail.com>>
>>>               <mailto:fabrizio.rota a gmail.com
>>>        <mailto:fabrizio.rota a gmail.com>
>>>               <mailto:fabrizio.rota a gmail.com
>>>        <mailto:fabrizio.rota a gmail.com>>>>
>>>
>>>
>>>                      Utilizza le keyword sulla cartella, in questo
>>>        modo puoi
>>>                      "taggare" le cartelle che vuoi/non vuoi
>>>               mettendo/togliendo una
>>>                      parola chiave sulla cartella.
>>>
>>>                  Questo sarebbe il massimo, ma non so davvero come
>>>               referenziare le
>>>                  parole chiave in una espressione python (in pratica
>>>        NON SO
>>>               NULLA
>>>                  DI PYTHON - e pure di molte altre cose).
>>>
>>>                  E poi c'è una seconda faccenda: così come è fatto il
>>>        prodotto
>>>                  lista in sottonavigazione anche i files, non solo le
>>>        cartelle
>>>                  (l'ho notato adesso)!
>>>
>>>                  E' possibile adattarlo alla visualizzazione delle sole
>>>               cartelle?
>>>                  (ad esempio modificando
>>>
>>>                  navbarobjects python: navbardata['contents'];
>>>        navbarselected
>>>                  python: navbardata['selected'];"
>>>                  )?
>>>
>>>                  faber
>>>                                    Io, invece, ho usato un altro
>>>        approccio, cioè uso
>>>                      portal-action e una convenzione sui nomi, per
>>>        gestire
>>>                      navigazione principale e sottonavigazione perché non
>>>               c'era una
>>>                      necessaria corrispondenza tra nomi e cartelle alla
>>>               navigazione.
>>>
>>>                      Se il sito è complesso conviene adottare la
>>>        strategia della
>>>                      doppia skin (admin.sito.com
>>>        <http://admin.sito.com> <http://admin.sito.com>
>>>               <http://admin.sito.com> e
>>>                      www.sito.com <http://www.sito.com>
>>>        <http://www.sito.com>
>>>               <http://www.sito.com>), uno per gestire i
>>>
>>>                      contenuti e l'altro per visualizzarli.
>>>                      Il primo ha una skin di default e ti muovi nella
>>>        logica di
>>>                      immettere il contenuto, il secondo ha uno skin
>>>        "figo" e
>>>               con la
>>>                      logica della ricerca e visualizzazione del
>>>        contenuto.
>>>
>>>
>>>
>>>                          --            Faber
>>>                          --------------------
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>                          _______________________________________________
>>>                          Plone-IT mailing list
>>>                          Plone-IT a lists.plone.org
>>>        <mailto:Plone-IT a lists.plone.org>
>>>               <mailto:Plone-IT a lists.plone.org
>>>        <mailto:Plone-IT a lists.plone.org>>
>>>               <mailto:Plone-IT a lists.plone.org
>>>        <mailto:Plone-IT a lists.plone.org>
>>>               <mailto:Plone-IT a lists.plone.org
>>>        <mailto:Plone-IT a lists.plone.org>>>
>>>
>>>
>>> http://lists.plone.org/mailman/listinfo/plone-it
>>>                          http://www.nabble.com/Plone---Italy-f21728.html
>>>
>>>
>>>
>>>                      _______________________________________________
>>>                      Plone-IT mailing list
>>>                      Plone-IT a lists.plone.org
>>>        <mailto:Plone-IT a lists.plone.org>
>>>               <mailto:Plone-IT a lists.plone.org
>>>        <mailto:Plone-IT a lists.plone.org>>
>>>               <mailto:Plone-IT a lists.plone.org
>>>        <mailto:Plone-IT a lists.plone.org>
>>>               <mailto:Plone-IT a lists.plone.org
>>>        <mailto:Plone-IT a lists.plone.org>>>
>>>
>>>                      http://lists.plone.org/mailman/listinfo/plone-it
>>>                      http://www.nabble.com/Plone---Italy-f21728.html
>>>
>>>
>>>
>>>
>>>                  --    Fabrizio
>>>                  --------------------
>>>                  "Life is what happens to you while you're busy
>>>        making other
>>>               plans"
>>>                  - J. Lennon
>>>
>>>
>>>
>>>
>>>               --        Fabrizio
>>>               --------------------
>>>               "Life is what happens to you while you're busy making other
>>>               plans" - J. Lennon
>>>
>>>  ------------------------------------------------------------------------
>>>
>>>               _______________________________________________
>>>               Plone-IT mailing list
>>>               Plone-IT a lists.plone.org
>>>        <mailto:Plone-IT a lists.plone.org>
>>>        <mailto:Plone-IT a lists.plone.org
>>>        <mailto:Plone-IT a lists.plone.org>>
>>>               http://lists.plone.org/mailman/listinfo/plone-it
>>>               http://www.nabble.com/Plone---Italy-f21728.html
>>>
>>>
>>>
>>>           --    Yuri Carrer
>>>
>>>           CAB - Centro di Ateneo per le Biblioteche
>>>
>>>
>>>
>>>           _______________________________________________
>>>           Plone-IT mailing list
>>>           Plone-IT a lists.plone.org <mailto:Plone-IT a lists.plone.org>
>>>        <mailto:Plone-IT a lists.plone.org
>>>        <mailto:Plone-IT a lists.plone.org>>
>>>           http://lists.plone.org/mailman/listinfo/plone-it
>>>           http://www.nabble.com/Plone---Italy-f21728.html
>>>
>>>
>>>
>>>
>>>        --         Fabrizio
>>>        --------------------
>>>        "Life is what happens to you while you're busy making other
>>>        plans" - J. Lennon
>>>
>>>  ------------------------------------------------------------------------
>>>
>>>        _______________________________________________
>>>        Plone-IT mailing list
>>>        Plone-IT a lists.plone.org <mailto:Plone-IT a lists.plone.org>
>>>        http://lists.plone.org/mailman/listinfo/plone-it
>>>        http://www.nabble.com/Plone---Italy-f21728.html
>>>
>>>
>>>
>>>    _______________________________________________
>>>    Plone-IT mailing list
>>>    Plone-IT a lists.plone.org <mailto:Plone-IT a lists.plone.org>
>>>    http://lists.plone.org/mailman/listinfo/plone-it
>>>    http://www.nabble.com/Plone---Italy-f21728.html
>>>
>>>
>>>
>>>
>>> --
>>> Fabrizio
>>> --------------------
>>> "Life is what happens to you while you're busy making other plans" - J.
>>> Lennon
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Plone-IT mailing list
>>> Plone-IT a lists.plone.org
>>> http://lists.plone.org/mailman/listinfo/plone-it
>>> http://www.nabble.com/Plone---Italy-f21728.html
>>>
>>
>>
>> _______________________________________________
>> Plone-IT mailing list
>> Plone-IT a lists.plone.org
>> http://lists.plone.org/mailman/listinfo/plone-it
>> http://www.nabble.com/Plone---Italy-f21728.html
>>
>
>
> _______________________________________________
> Plone-IT mailing list
> Plone-IT a lists.plone.org
> http://lists.plone.org/mailman/listinfo/plone-it
> http://www.nabble.com/Plone---Italy-f21728.html
>



-- 
Fabrizio
--------------------
"Life is what happens to you while you're busy making other plans" - J.
Lennon
-------------- parte successiva --------------
Un allegato HTML è stato rimosso...
URL: <http://lists.plone.org/pipermail/plone-plone-it/attachments/20090129/e62f9ae8/attachment.html>


Maggiori informazioni sulla lista Plone-IT