Re: %langs no longer visible in searchtmpl/search.data
On Sat, Jul 14, 2001 at 12:31:34AM +0200, Josip Rodin wrote:
> Hi,
>
> The foreach loop doesn't output anything because it doesn't seem to see the
> %langs variable. This is supposed to be included from the languages template
> but it broke recently. Anyone have any ideas?
It's your own fault ;)
This problem comes from template/debian/navbar.wml 1.54, especially this
block of text:
<ifeq "$(NOMIRRORS)" "" "
<td align="right" valign="middle">
<table><tr><td align="center">
#include wml::debian::mirrors small="yea" usefonts="yes"
fontcolor="#990000"
</td></tr></table>
</td>
">
The #include directive is processed during the first pass, and it calls
wml::debian::mirrors which in turn calls wml::debian::languages.
But because of the conditional, all included text is discarded during
pass 2. And as modules are read only once, they are uneffective.
So you see it is a bad idea to conditionnally include templates, or at
least you should separate tag definitions from output text, so that the
former are unconditionnally included. Meanwhile, just put
#use wml::debian::countries
#use wml::debian::languages
before
<ifeq "$(NOMIRRORS)" "" "
...
Denis
Reply to: