[Pmwiki-users] About [:fi:] (Was: can i get a "live" sidebar?)

chr@home.se chr
Sat Oct 16 03:35:49 CDT 2004


On Fri, 15 Oct 2004, Patrick R. Michaud wrote:

> The [:if ...:] syntax allows portions of the markup text
> to be conditionally processed (up to the next [:if:]) ...

So a clause statement is not terminated by and end-of-line, but only by
the next [:if...:] (or end-of-page)?

> Any [:if:] automatically terminates the previous one, thus markup can
> be easily cased:
> 
>    [:if group PmWiki:] Do this in PmWiki group
>    [:if group Main:] Do something else for Main
>    [:if:] This happens in all groups

That looks really unintuitive to me... for the example above, why not use
a syntax like this instead:

    [:if group PmWiki:] Do this in PmWiki group
    [:elseif group Main:] Do something else for Main
    [:if:] This happens in all groups

And I think it'd also be more readable if something like '[:endif:]' could
be defined as a macro for '[:if:]'. The example would then look like:

    [:if group PmWiki:] Do this in PmWiki group
    [:elseif group Main:] Do something else for Main
    [:endif:] This happens in all groups

However, if nested if-statements aren't allowed, I think we will quickly 
run into problems with something like this:

	[:if group PmWiki:][:include Main.SideBarPmWiki:][:endif:]

when 'Main.SideParPmWiki' contains if-statements. Or am I missing 
something here?

/Christian

-- 
Christian Ridderstr?m, +46-8-768 39 44               http://www.md.kth.se/~chr





More information about the pmwiki-users mailing list