Re: [Zope] breadcrumbs ques
| OdesÃlatel: AM <list_subscriber@neurobs.com> | my final solution: | | result = [] | url = container.REQUEST.BASE0 | path = context.getPhysicalPath() | for id in path: | if id != '': | url = url + '/' + id | result.append({'id':id,'url':url}) | return result # adjust as appropriate to get your site root | | | Now the only problem is I wanted the titles for these thingies cos ids | cant have spaces..... Hi, try pure DTML solution, what works with virtual webs too: <dtml-in "PARENTS[:-1]" skip_unauthorized
<dtml-if sequence-start><dtml-else <a class="navltop" href="<dtml-var absolute_url>/"><dtml-var title_or_id></a </dtml-if <dtml-if sequence-end><dtml-else <br></dtml-if </dtml-in>
put that DTML Method at ROOT of your Zope web. Regards J. Lukesh
what about Chris' solution and his comment : "Using PARENTS for breadrumbs is bogus." -AM Jaroslav Lukesh wrote:
| OdesÃlatel: AM <list_subscriber@neurobs.com> | my final solution: | | result = [] | url = container.REQUEST.BASE0 | path = context.getPhysicalPath() | for id in path: | if id != '': | url = url + '/' + id | result.append({'id':id,'url':url}) | return result # adjust as appropriate to get your site root | | | Now the only problem is I wanted the titles for these thingies cos ids | cant have spaces.....
Hi, try pure DTML solution, what works with virtual webs too:
<dtml-in "PARENTS[:-1]" skip_unauthorized
<dtml-if sequence-start><dtml-else <a class="navltop" href="<dtml-var absolute_url>/"><dtml-var
title_or_id></a
</dtml-if <dtml-if sequence-end><dtml-else <br></dtml-if </dtml-in>
put that DTML Method at ROOT of your Zope web.
Regards J. Lukesh
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
-- ================================================================== Aseem Mohanty Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706 (R) 510 7696011 (M) 510 3014871 (O) 510 5279231 ================================================================== "I saw `cout' being shifted "Hello world" times to the left and stopped right there!!" -- Steve Gonedes ==================================================================
participants (2)
-
AM -
Jaroslav Lukesh