Forum OpenACS Q&A: Re: Finding Variable Source

Collapse
Posted by Ryan Gallimore on
Hi Don,

Those variables are set in "slave" pages using the property adp tag.

See https://openacs.org/doc/acs-templating/guide/master.html for more information.

Essentially, when you call your page foo.tcl/adp and it declares a property called header_stuff, it passes that value up the template stack to the master.

This allows you to set variables in the master at the page level, without changing the master template scripts.

To modify the behaviour of htmlAreas, see the acs-templating package parameters. If the solution is not there, let us know what you are looking to change.

Regards,
Ryan

Collapse
Posted by Don Curt on
Thank you Ryan for the quick response.

So if I understand, the scope of a variable (unless Global or Namespace)is only within the page "stack".

So if I want to find the original set of a var it has to be in the hierarchy of pages?

How do I know the var e.g. @header_stuff@ is not a var set somewhere else as a Global?

Thanks.

Don

Collapse
Posted by Ryan Gallimore on
Typically, you do not have to look through the hierarchy of pages. If you are requesting /foo just override the master template value with a property tag in foo.tcl/adp.

The global value would only be used in your adp if it was the last value set, just like any other variable.

Here is another good reference:

https://openacs.org/doc/templates.html

Regards,
Ryan