RE: [Zope] Newbie:Navigational bar
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 )
Now I'll let the more experienced Zopistas tear this code to pieces and tell you the Right Way. :-) I forget which of the more experienced Zopistas posted the "PARENTS.reverse()" tidbit, but how about: <!--#call "PARENTS.reverse()"--> <!--#in "PARENTS"--> <!--#if "not _['sequence-start']"--> : <!--#/if--> <a href="<!--#var "_['sequence-item'].absolute_url()"-->"> <!--#var "_['sequence-item'].title_or_id()"--></a> <!--#/in-->
And I'll use the rest of your code, thanks. - Craig -- Craig Allen - Managing Partner - Mutual Alchemy Information Architecture - http://alchemy.nu
participants (2)
-
Alexander Staubo -
Craig Allen