Re: [htdig] problems with build_select_lists

Subject: Re: [htdig] problems with build_select_lists
From: Gilles Detillieux (
Date: Wed Oct 04 2000 - 09:07:50 PDT

According to Daniel Lang:
> Gilles Detillieux wrote on Mon, Oct 02, 2000 at 06:27:37PM +0000:
> > Here's the problem. You can't arbitrarily define or redefine which config
> > attribute is associated with which input parameter. The exclude_pattern
> > attribute is one you made up, while the exclude input parameter ends up
> > being stored in the "exclude" config attribute.
> >
> > Granted, the documentation is pretty weak in this area, so you almost need
> > to look at the code to be sure of all parameter to attribute associations
> > of this sort. Anyway, your exclude input parameter will not have any

> Well, this is indeed tricky, since I had a look at the list of
> all configuration attributes and 'exclude' and 'restrict' did not
> show up, so I thought, I just make one up by myself, and let
> htsearch figure it out through the build_select_list attribute
> (since that creates a connection)...

I understand the assumption, but unfortunately build_select_lists does
not create the connection between the input parameter and the config
attribute (although allow_in_form does, but that's another matter).
build_select_lists tries to make use of an existing connection between
them. Unfortunately, those existing connections are poorly documented,
if at all.

As a side note, I've recently extended the build_select_lists attribute
so that you can use it in circumstances where there is no connection
between the input parameter and an attribute, by setting the attribute
name (7th item) to an empty string. The patch is available at:

and will be included in the next beta release of 3.2 as well. It includes
other enhancements as well, especially the ability to make lists of
radio buttons or checkboxes, or allow multiple selections.

> So it would be a good idea, just to include these config attributes
> into the documentation...

Yes, that's an excellent suggestion. Thanks. I had suggested documenting
the whole set of internal mappings of input parameter to config attribute
to template variable - and I still think it's very important to do so -
but we should also make sure that ALL config attributes are documented in
attrs.html (i.e. in for 3.2), even if they're never really
intended to go in the config file but only set by input parameters.

This is all part of the catch phrase "Not all htsearch input parameters
are handled properly: PR#648" in the 3.2 development code's STATUS file,
but I should make a more explicit note or two about documentation changes.
I'm still hoping that in about a month or so, I'll be a tad less busy
and will have a bit of time to work on this myself.

Gilles R. Detillieux              E-mail: <>
Spinal Cord Research Centre       WWW:
Dept. Physiology, U. of Manitoba  Phone:  (204)789-3766
Winnipeg, MB  R3E 3J7  (Canada)   Fax:    (204)789-3930

------------------------------------ To unsubscribe from the htdig mailing list, send a message to You will receive a message to confirm this. List archives: <> FAQ: <>

This archive was generated by hypermail 2b28 : Wed Oct 04 2000 - 09:14:51 PDT