Forum OpenACS Development: Response to Breadcrumb trail service?

Posted by Luke Pond on
The Edit This Page package automatically generates a context bar for every page it serves. This is done using ad_context_bar, since ETP subtopics are equivalent to package instances. The resulting html fragment is stored for you in the "pa" array variable created by etp::get_page_attributes, so your page templates need to reference @pa.context_bar@.

I chose to remove the "Your Workspace" link from the beginning of the context bar for two reasons: 1) Like Jerry, I don't really think it belongs there, and 2) Since the page attributes are cached, I didn't want a page's context bar changing depending on whether or not the user was logged in. The caching allows ETP to avoid issuing the same queries over and over for each page, and this includes the query on the site_nodes table performed by ad_context_bar.

Even better for navigational purposes, once you're using the content repository, you can write a single query that generates a dynamic hierarchical site-map to be displayed on every page. See for an example. To me, this feature is one of the best arguments for storing your static content in the database.