[pmwiki-users] Feature I want, multi-select PTVs l like page includes

Peter Bowers pbowers at pobox.com
Mon Oct 6 15:31:59 CDT 2014


On Thu, Oct 2, 2014 at 7:18 PM, <ccox at endlessnow.com> wrote:

> I'd love to see a standard markup for PTV inclusion with something
> similar, either based on existence of the PTV for a page (where multiple
> pages could be specified) and optional maybe if the PTV has a value (but I
> can live without that since empty value is a value).
>
> for example
> {SomeGroup/Name OtherGroup/Name$:Summary}
>

You could fairly easily put a rule just before {$var} which searched for
the same pattern as {$:var} but including whitespace before the $.  Then
simply split the part before $ and replace the {x y z$:var} with the
conditional that StefCT suggested.  Your markup is easy to read and you let
pmwiki continue to do all the heavy lifting...  (Or, of course, you could
do the substitution yourself directly to the value, thus giving yourself
the ability to differentiate between empty variables and nonexistent
variables - slightly more work, but better functionality too.)

In any event, the point is that a space (or comma or vertical bar) in a PTV
is a fairly easy condition to find in your rule regex and so is quite easy
to custom-code around.

-Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20141006/2fde2a1f/attachment.html>


More information about the pmwiki-users mailing list