[pmwiki-users] Defining a variable in a wiki page
Patrick R. Michaud
pmichaud at pobox.com
Wed Apr 19 15:02:45 CDT 2006
On Wed, Apr 19, 2006 at 05:13:34PM +0200, Tom wrote:
> Ok.. thanks for the answer.
>
> So with conditional there are problems. How about other markup?
>
> Like setting a class or style and reusing that one?
>
> (:set Name tom:)
> (:set Name1 red:)
>
> >>class=$Name<<
>
> %color=$Name1%
>
> How about that ones? Obvious to see, the advantage of easy changing
> values is seeked by me.
FWIW, there's already a way to do this for wikistyles:
%define=Name class=tom%
%define=Name1 color=red%
>>Name<< (same as >>class=tom<<)
%Name1% (same as %color=red%)
Of course, wikistyles already have a class= short, so the first one
can be done without the define:
>>tom<< (same as >>class=tom<<)
Pm
> Patrick R. Michaud schrieb am 19.04.2006 17:04 Uhr:
> > On Wed, Apr 19, 2006 at 04:50:03PM +0200, Tom wrote:
> >> I know i read it somwhere, but i can't seem to find it anymore.
> >>
> >> Is there a markup to define a variable in a page, that can be used lateron?
> >>
> >> (:set Name Tom:)
> >>
> >> (:if equal $Name Tom:) or something like that .... ??
> >
> > it's being discussed (try searching the mail archives for
> > "page properties").
> >
> > It doesn't exist in the core yet -- I'm still working out a few details.
> >
> > Part of the problem is one of sequencing -- with PmWiki's
> > existing markup rendering engine it's hard to have both
> >
> > (:set Name Tom:)
> > (:if equal $Name Tom:)
> > ...
> > (:if:)
> >
> > and
> >
> > (:if condition:)
> > (:set Name Tom:)
> > ...
> > (:if:)
> >
> > because if we process the "(:set:)" markup first, it will ignore
> > the conditional, and if we process the "(:if:)" markup first,
> > we can't use values from "(:set:)" as part of the conditional.
> >
> > Dominique Faure and I have been working out some likely solutions
> > to this, but it's still in the design stage.
> >
> > Pm
> >
> >
>
More information about the pmwiki-users
mailing list