[pmwiki-users] (:input select ... :) markup prototype

Kathryn Andersen kat_lists at katspace.homelinux.org
Tue Dec 12 04:12:50 CST 2006


On Mon, Dec 11, 2006 at 05:27:13PM -0600, Patrick R. Michaud wrote:
> On Mon, Dec 11, 2006 at 11:06:17PM +0000, Hans wrote:
> > It looks very promising. Great to see multiple choice support,
> > and vertical size support. I guess horizontal size could be
> > manipulated with css via name for instance #abc {width:10em;} ?
> > 
> > But there is a lot of repetitive code:
> > 
> > (:input select name=abc 1 alpha :)
> > (:input select name=abc 2 beta  :)
> > (:input select name=abc 3 gamma :)
> > 
> > instead of
> > 
> > (:select abc:)
> > (:opt 1 alpha :)
> > (:opt 2 beta  :)
> > (:opt 3 gamma :)
> > (:selectend:)
> > 
> > Of course I see that including name=abc avoids the first and last
> > line (select, selectend). 
> 
> ...and this is a *huge* advantage when generating select boxes
> from pagelists, since we don't have to generate the initial select
> and selectend directives.  It also means we don't have to deal
> with the weird case where an author forgets the select/selectend.

Agreed.  I was just getting ready to point that out when I read this...
A lot of people have been hanging out for (:input select :)
with the intent of using a pagelist to populate it -- that can lead to
nifty things like drop-down lists of pages to jump to, and so on.
 
> > But it will make it bulky if you use a lot of options.
> 
> I've been thinking that it can be:
> 
>     (:input select name=abc 1 alpha :)
>     (:input select 2 beta:)
>     (:input select 3 gamma:)
>     (:input select 4 whatever:)
> 
> So far I've somewhat avoided this because it goes against
> the pattern of most of the other (:input:) markups.  Having
> the single name= parameter as above means that the generic form is
> 
>     (:input select   <value> [<label>]:)
> 
> whereas many (but not all) of the other input controls have the form
> 
>     (:input text     <name> [<value>] :)
>     (:input radio    <name> [<value>] :)
>     (:input checkbox <name> [<value>] :)
> 
> Note specifically (:input radio:), where the name is repeated for 
> each control regardless of the number of buttons, just like select
> does now.

I'm in favour of making them more consistent with each other; it would
be nice if the name were optional on repeat, but not if that loses us
the ease-of-building with pagelists.
 
Kathryn Andersen
-- 
 _--_|\     | Kathryn Andersen	<http://www.katspace.com>
/      \    | 
\_.--.*/    | GenFicCrit mailing list <http://www.katspace.com/gen_fic_crit/>
      v     | 
------------| Melbourne -> Victoria -> Australia -> Southern Hemisphere
Maranatha!  |	-> Earth -> Sol -> Milky Way Galaxy -> Universe




More information about the pmwiki-users mailing list