marc said...
> New recipe
>
> Dropdown widget that persists its selected value between pages
>
> http://www.pmwiki.org/wiki/Cookbook/AuxSelect
>
> This recipe allows you to create a dropdown form that is populated with
> values from a PHP array. The dropdown can be preceded by a text label.
> The current value is set by the site visitor via a button; a default
> value can be set by the admin. The current value is stored in a session
> variable.
>
> In more simple language: it's easy to create a currency selector with
> this recipe. For example:
>
> $AuxSelectData['currencies'] = array('EUR','GBP','USD');
> (:auxSelect currency currencies default=GBP text='Currency: ':)
>
> It might be useful to extend this recipe to provide some conditional
> markup for use within a page. I'm happy to do that if folk think it will
> be useful.
In fact, by using the httpvariables.php recipes, the conditional markup
is already available.
Using the previous example:
In config.php
$AuxSelectData['currencies'] = array('EUR','GBP','USD');
In page:
(:auxSelect currency currencies default=GBP text='Currency: ':)
(:if equal {$~currency} 'EUR':)fred(:if:)
(:if equal {$~currency} 'GBP':)barney(:if:)
(:if equal {$~currency} 'USD':)dino(:if:)
You just gotta love PmWiki.
--
Cheers,
Marc
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users