Forum OpenACS Q&A: Context Problems

Collapse
Posted by Roger To on
Hi All,

I've been having a few problems in using the new context bar. I've read up on the forums and everything and tried the new method using the context property but nothing seems to appear in the adp page.

I'm currently using OACS4.6

I've taken the advide of this thread

https://openacs.org/forums/message-view?message_id=62150

and done exactly the same thing as what Jeff has suggested, unfortunately nothing appears on my adp page.

In my tcl file i have done the following

set context [list [list $reference_name] "References"]

In the corresponding adp file, i have placed the line

<property name="context">@context@</property>

Yet nothing appears.

I have tested the variable context in the same adp file and it contains the following value

{{Temp Category}} References

Can anyone explain to me the problem and how i could solve it?

Thanks

Collapse
2: Re: Context Problems (response to 1)
Posted by Jeff Davis on
It looks like $reference_name was already a list so you
dont need to put it in a list again.
so you would want [list $reference_name References] I think.
Collapse
3: Re: Context Problems (response to 2)
Posted by Roger To on
$reference_name is a multirow. This is slightly different from a list in structure but would it matter for use in context?

I've also removed the inner list and for some reason nothing appears where i've placed

<property name="context>@context@</property>

I've placed this line in a file that usees a master adp file. So what i have now at the beginning of this file is the following

<if @parent_id@ ne "">

<master src="master">
<property name="title">@title@</property>
<property name="context">@context@</property>

Is this method correct?

(Using <master src="master"> instead of <master> still works, though i haven't had the time to change it)

Collapse
4: Re: Context Problems (response to 3)
Posted by Tilmann Singer on
For experimentation you might want to start by trying to enter the value directly as text, like that:

<property name="context>Test</property>

I don't think you can pass multirows directly as the context property - as far as I know they are something different than a simple list. Maybe you want to use db_list_of_lists instead.

Also did you make sure that the parameter that switches the context bar on is set correctly? It's in acs-subsite I think, and some time ago it was set to 0 by default.

Collapse
5: Re: Context Problems (response to 4)
Posted by Roger To on
Thanks for the help!

I've got things paritally working.

Seems that i had two problems.

Firstly i was using an old master adp page that didn't conform with the new standards and secondly the input i had passed was a multirow rather than a list