According to Lachlan Andrew:
> Are variables in (no_)page_list_header supposed to be expanded?
In the general case, attribute definitions can refer to other attribute
definitions to get their values. What you're suggesting, though, would
be for attribute definitions to be able to refer to template variable
values, or for template variable expansion to be applied recursively.
Either way, it's a new feature, not trivial to implement (I'd guess) and
with the potential to introduce new bugs/complications. Not something
I'd suggest doing just prior to release.
> If page_list_header = ${PAGELIST} (which seems a sensible value)
I'm not sure what you're getting at, because this doesn't seem at all
sensible considering how these template variables are currently set
and used. The standard footer.html begins with...
$(PAGEHEADER)
$(PREVPAGE) $(PAGELIST) $(NEXTPAGE)
where PAGEHEADER is set to no_page_list_header if there is only one
page of results, or page_list_header otherwise. PAGELIST is the list
of buttons and/or text links to other result pages. Why would you want
to set PAGEHEADER to the value of PAGELIST?
> then PAGEHEADER is empty when there is more than one page, even
> though PAGELIST isn't. Before I submit a bug report, is the
> correct behaviour for it to expand to the value of PAGELIST, or to
> remain the literal string "${PAGELIST}"?
As far as I can tell, the code is correct and stable right now. Maybe
I'm misunderstanding what you're trying to accomplish, and how you're
attempting to go about it. Do you think attribute definitions ought to
be able to reference template variables (probably extremely tricky to
implement) or that template variables should be expanded recursively?
What do your config file and template look like?
--
Gilles R. Detillieux E-mail: <gr...@sc...>
Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/
Dept. Physiology, U. of Manitoba Winnipeg, MB R3E 3J7 (Canada)
|