Re: Re: Dokumente ohne Eintrag im Navigations-Portlet

Martin Stadler <[email protected]>
Newsgroups gmane.comp.web.zope.german
Message-ID <[email protected]>
Am 11.12.2008 um 17:32 schrieb Kai Diefenbach:

> Moin,
>
>> Ich habe schon im Chat gefragt und nur den Tipp bekommen, das
>> Navigationsportlet zu verändern. Das habe ich schon mal bei einem
>> anderen Projekt gemacht und scheint mir für diesen Fall viel zu
>> aufwändig.
>
> Naja, aufwendig?
>
> In navigation_recurse einfach die tal:condition einfach verändern in:
>
> tal:condition="python:(not node['item'].exclude_from_nav) and
> (node['portal_type'] not in view.getMetaTypesNotToList()) and
> (bottomLevel &lt;= 0 or level &lt;= bottomLevel)">
>
> Den zweiten Term kannst Du weglassen, den habe ich nur der
> Vollständigkeit halber drin gelassen.
>
> Wenn Du es ordentlich machen willst, musst Du noch eine abgeleiteten
> Porlet Renderer (von plone.app.portlets.portlets.navigation) erstellen
> und per configure.zcml einbinden. (Evtl. hast Du doch recht :-)
>
> AFAIK gibt es dafür ein gutes Tutorial auf plone.org, ich kann Dir den
> Kram aber auch schicken. Gib einfach kurz Bescheid.
>
>> Wie würdet ihr diese Anforderung lösen? Ist das nicht ein
>> ganz alltägliches Problem...?
>
> Ja, ich weiß auch nicht wer "excluded" Seiten angezeigt haben möchte.
>
> Gruß
> Kai

Danke für den Tipp!

Meine condition sieht nun so aus:
     tal:condition="python:(not node['item'].id in  
view.getIdsNotToList()) and (node['portal_type'] not in  
view.getMetaTypesNotToList()) and (not node['item'].exclude_from_nav)  
and (bottomLevel &lt;= 0 or level &lt;= bottomLevel)"

Klar ist es nicht soooo aufwändig. Aber doch relativ viel Code für die  
veränderte Condition im Template.

Gruß,
Martin




_______________________________________________
zope mailing list
[email protected]
https://mail.dzug.org/mailman/listinfo/zope
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.