[Zope] Newbie:Navigational bar

Alexander Staubo alex@mop.no
Fri, 11 Jun 1999 03:36:22 +0200


Yep. Once upon a time I wrote this. It might not be the best or most
efficient way to do it, but darn, it works (it would have been the best
way if #in supported reverse iteration, because then we could skip the
temporary "dirs" variable).

The use of absolute_url() might not be to your taste -- if you use
recursive acquisition, the navigation bar will link to the true location
of the object, not to the acquired path. You can fix this by maintaining
a temporarily variable for the URL.

<!--#call "REQUEST.set('dirs', [])"-->
<!--#in PARENTS skip_unauthorized-->
  <!--#call "dirs.insert(0, _['sequence-item'])"-->
<!--#/in-->
<!--#in dirs skip_unauthorized-->
  <!--#if "not _['sequence-start']"--> : <!--#/if-->
  <a href="<!--#var "_['sequence-item'].absolute_url()"-->"><!--#var
"_['sequence-item'].title_or_id()"--></a>
<!--#/in-->

Now I'll let the more experienced Zopistas tear this code to pieces and
tell you the Right Way. :-)

--
Alexander Staubo             http://www.mop.no/~alex/
"`Ford, you're turning into a penguin. Stop it.'"
--Douglas Adams, _The Hitchhiker's Guide to the Galaxy_

>-----Original Message-----
>From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
>Adrian Esteban Madrid
>Sent: 11. juni 1999 03:16
>To: Zope List
>Subject: [Zope] Newbie:Navigational bar
>
>
>Anybody has any idea/tutorial/rumors on how to create a
>navigational bar
>like this?
>
>Home : Community : InvestorsCorner : Introduction : Disclaimer
>
>Each item can be linked, so you can step back to Community skipping
>Introduction with one click.
>
>Any ideas would be appeciated.
>
>-aem
>
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://www.zope.org/mailman/listinfo/zope
>
>(For developer-specific issues, use the companion list,
>zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
>