[pmwiki-users] (conditional markup) if action XXX

Patrick R. Michaud pmichaud at pobox.com
Mon Mar 6 15:53:15 CST 2006


On Mon, Mar 06, 2006 at 09:30:00PM +0100, noskule wrote:
> Hi list
> is there a way to get an conditional markup so I could write
> 
> (:if !action edit :)* [[{$FullName?action=edit|Edit}]](:if:)
> (:if !action view :)* [[{$FullName?action=view|View}]](:if:)

Traditionally we have done this by using CSS classes to hide
the relevant link:

    $HTMLStylesFmt['action'] = " .$action { display:none; } ";

There will eventually be a way to grab parameters (such as action)
from urls and posted data into markup; I just haven't decided
the syntax yet.  I may decide to use {?action} as a variation on
page variable markups, such that we get

    (:if equal {?action} edit:) ...
    (:if equal {?action} view:) ...

Pm




More information about the pmwiki-users mailing list