Forum OpenACS Development: ad_context_bar - the real answer

Collapse
Posted by Jon Griffin on
What is the current best practice for context bars.

It seems that ad_context_bar is really not consitently used. I notice some package use @context_bar@ others @context@, the master template does something different depending. I know the original AD code used @context_bar@. Also, it seems that bread crumbs don't work. If you have a static page, what is the suggested way of adding the trail to your .tcl file?

I just want clarification for best practices.

Collapse
Posted by Tom Jackson on

Jon, the context bar has improved over the last few years. I just fixed up one package which used the old ad_context_bar procedure on each tcl page and then the @context_bar@ variable on the adp page. The changes were:

Tcl page, just:


set title "My page"
set context [list "$title"]

...
on the adp page:
<property name="title">@title@</property>
<property name="context">@context@</property>

What shows up is a breadcrumb. I haven't looked into the assumptions made, I guess it just hopes you have index pages up to the main site.