[pmwiki-users] Conditional Redirect and Markup Cheatsheet

Patrick R. Michaud pmichaud at pobox.com
Mon Mar 6 20:37:32 CST 2006


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




More information about the pmwiki-users mailing list