[pmwiki-users] Conditional Redirect and Markup Cheatsheet

The Editor editor at fast.st
Tue Mar 7 20:43:44 CST 2006

On 3/6/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> On Mon, Mar 06, 2006 at 07:19:23PM -0500, The Editor wrote:
> > 2.  Pm suggested I create a floating bar, inserting the code below
> > into Site.EditForm to make a Markup cheat sheet.  This was a good
> > idea, that I should have thought of, but I was wondering if there was
> > a way to actually put it into a sidebar or rightbar to appear only
> > when the action is edit.
> In the template, use
>     <!--PageRightFmt-->
>       <!--wiki:SomeGroup.MarkupCheatSheet-->
>     <!--/PageRightFmt-->
> to define the section, and then in config.php use
>     if ($action != 'edit') SetTmplDisplay('PageRightFmt', 0);
> to suppress it whenever the action is not 'edit'.  Or you
> can do this from skin.php with
>     global $action;
>     if ($action != 'edit') SetTmplDisplay('PageRightFmt', 0);
> Pm

This is more what I had in mind, but I already have something in the
right bar for my normal pages (therefore turning off the display is
not an option). I am hoping there's a way to simply substitute the
bar's content when a page goes into edit mode. That is, override the
default setting for my RightBar which is <!--wiki:$Group.RightBar
$SiteGroup.RightBar--> (from the template).  Something like the
following if there is way to script it:

if ($action = 'edit') use Site.Cheatsheet in RightBar

Or preferably, something like this in Site.EditForm:

(:if action=edit use Site.Cheatsheet in RightBar:)

Of course, what kind of syntax to use is beyond me.  Appreciate any
suggestions. Goodnight all.


More information about the pmwiki-users mailing list