[pmwiki-users] line break, page text variables et conditional markup

tamouse mailing lists tamouse.lists at gmail.com
Sun May 5 23:20:26 CDT 2013


On Sun, May 5, 2013 at 7:13 AM, Benjamin Grassineau
<benjamingrassineau at gmail.com> wrote:
> Hello everybody
>
> Suppose we have an hidden ptv
>
> (:a: youpi:)
>
> If we want to make a test about the value of this ptv (for example in
> the group header), we can do this,
>
> (:if equal "{$:a}" "youpi":)OK(:if:)
>
> and, the text wich appears is:
>
> "OK"
>
> Now, if we break a line in the ptv, for example
>
> (:a: Youpi
>  How are you ?:)
>
> (:if equal "{$:a}" "Youpi":)OK(:if:)
>
> We obtain
>
> "(:if equal "Youpi How are you ?" "Youpi":)OK"
>
> Wich is not exactly what we wish to obtain !!
>
> I don't know how to solve this problem. I can't use a markup for
> delete line-break, because, it won't work with line-break !
>
> Someone have a solution, an idea ? Maybe a php function ? But i need
> to use this function in wiki pages ?
>
> Benjamin.

Not *quite* sure what you actually want, but you typically create
multi-line PTV thus:

(:aptv: This is line one. [=
=]This is line two. [=
=]This is line three! :)

In your example test, I'm not exactly clear what you want from that.
Testing the a PTV for equality to a portion of the string won't work;
there are some extensions to allow regexp matching, which might work?



More information about the pmwiki-users mailing list