|
From: Lachlan A. <lh...@us...> - 2003-10-25 16:20:12
|
Greetings all,
I've found the problem: In setVariables(), the command=20
vars.Add("PAGEHEADER", new String(config->Find("page_list_header")));
is executed before the command
vars.Add("PAGELIST", str);
That means that ${PAGELIST} is expanded as empty when the string is=20
created.
Swapping the order of these solves the particular problem, but the=20
more fundamental problem is that any variable can (or should be able=20
to be) defined in terms of any other, and there is no ordering which=20
can allow that. One possibility would be to go through and set each=20
variable *twice*, so that second time around, most variables should=20
have their right values. Of course, chains of variables defined in=20
terms of each other would need more than two iterations...
Another option would be to merge vars with config so that the=20
literal string ${PAGELIST} would be added, and only evaluated when=20
the variable is finally expanded during output.
Cheers,
Lachlan
On Fri, 24 Oct 2003 22:49, Lachlan Andrew wrote:
> Are variables in (no_)page_list_header supposed to be expanded?
>
> If page_list_header =3D ${PAGELIST} then PAGEHEADER is empty when
> there is more than one page, even though PAGELIST isn't.
--=20
lh...@us...
ht://Dig developer DownUnder (http://www.htdig.org)
|