[Pmwiki-users] SDV, SDVA
Patrick R. Michaud
pmichaud
Thu Feb 19 20:11:07 CST 2004
On Thu, Feb 19, 2004 at 11:01:56PM -0300, Andres Yver wrote:
> Hi, quick query:
>
> stdlayout.php has, on pmwiki.6, the page layout variables preceded by
> SDV and SDVA.
> What are these letters, and how are they used?
They're functions, SDV=="Set Default Value" and
SDVA=="Set Default Value Array". They're used to give a variable
a value only if it doesn't already have one set.
> I am guessing that they don't go along for the ride if we want to put a
> custom
>
> $PageLayoutFmt,array(whatever,else);
>
> in our local/config.php. Please correct me if they do need to go like
> this:
If you want to do that you either do:
$PageLayoutFmt['something'] = array(whatever,else);
or you can do
SDV($PageLayoutFmt['something'],array(whatever,else));
The first one always does the assignment. The second one does the
assignment only if $PageLayoutFmt['something'] doesn't have a value
already set.
Pm
More information about the pmwiki-users
mailing list