00696: "action" conditonal
Description:
Please add an action conditional (:if action ACTION:).
This would allow very mode systems from simple to very complex.
For example just hiding the edit button using (:if !action edit:) and so on.
I am using this workaround with PmWiki 2.0.13 right now
but I would love to see this officially included:
Thanks in advance, Sebastian
I've been thinking that we might want an {$Action} page variable, then the if conditional would be
(:if equal {$Action} edit:)
It seems to me that using {$Action} in this way might be more generic and useful in other contexts besides simply conditionals.
Also note that $_GET['action'] is technically not correct, since the action= parameter can come from a 'POST' request or could be modified by a recipe or local customization. Better is probably $GLOBALS['action'].
--Pm
I didn't know about $GLOBALS before.
You are right, this is better.
I changed my code to
$Conditions['action'] = '\$GLOBALS["action"]==\$condparm';
{$Action} sounds like a good idea.
--Sebastian