Forum OpenACS Development: Re: A Model for the Navigation Bar

Collapse
Posted by Jim Lynch on

This whole thing works in the context of your openacs package, which usually has a www/ dir and an index.tcl and index.adp inside.

One thing that happens when the navigation bar is rendered on a page, is links for "main site" and for your package are included in the navigation bar already, so you don't have to handle those at all. So, the index page should NOT arrange to receive a value for context_fragment (i.e., will not have a mention in the -query section of the ad_page_contract for the index page), and in fact will set up the context_fragment with an empty list:

set context_fragment [list ]
and this value will remain constant (as on the other pages).

Just like in the other pages, we will also copy this to context and to new_cntxt_frag, and list-append the title for this (the index) page to the variable context, and list-append a two-element list {url title} to new_cntext_frag, just as described above.

Now that we have this infrastructure on all the pages in our package, what now? How did I get from one page to the next? to the previous? That's in the next section.