Forum OpenACS Q&A: various variables in ad-defs.tcl.preload

I've been studying this evening various .tcl config files in order
to understand how things work. I guess many things will become
clearer once I start to modify settings and see what happens.
But for now I am stuck on not being able to find where some
variables are set.

For example within proc_doc ad_header, there is an entry

set html "<html>

Ok, I understand this works like setting any other variable: set x
"bla bla" and then we make reference to "bla bla" as $x (the value
of x)

I wasn't able to find where extra_stuff_for_document_header is set.
Is it set in defining the parameters of the procedure ? i.e.
proc_doc ad_header_with_extra_stuff {page_title

So is this procedure called in a form resembling this:
ad_header_with_extra_stuff [page_title
[some_procedure_that_gives_the_extra_stuff]] ?

I am trying to give as much detail about how my rationing goes on at
the moment and hope that someone is able to point out its flaws.


Posted by Dave Bauer on

IF you look at the source for ad_header, it shows extra_stuff_for_document_head is an optional parameter.

You can see here, page_title is required and extra_stuff_for_document_head is optional with a default value of "", an empty string. So if it is not specified in the call to ad_header, it is given a value of "".

proc_doc ad_header {page_title {extra_stuff_for_document_head ""}}
Posted by Pavel Boghita on
Thanks Dave