[pmwiki-users] Show/Hide Triad Skin / Sidebar

Hans design5 at softflow.co.uk
Tue Jan 20 15:36:28 CST 2009


Tuesday, January 20, 2009, 8:13:05 PM, edwin marte wrote:

> I am using Triad skin and basically in a AllGroupHeader Page I have the
> (:noright:) and (:noleft:) Markups. They work fine until I use the
> ?action=upload wich bring the sidebar.I have tried  a few things in the
> uploadquickreference Page in order not to show the SideBar when using
> ?action=upload. Anybody knows what has to be donde in order not to show the
> Sidebar with Triad skin in that condition?

I am thinking about it, but have not yet got an idea.
The problem is not restricted to the Triad skin, or any skin, i think.

With ?action=upload  a special upload form is loaded, and the normal
page content is ignored. which means any markup in th epage is also
ignored, even markup directives in a GroupHeader or AllGroupHeader
page. And worse: PmWiki has no wiki page to hold the upload form,
like it does for the standard edit form when action=edit is called.
The upload form is hard coded in uploads.php, and the Triad skin uses
a custom version for an upload form, defined in its skin.php file.

To inject the noright and noleft markup there may be possible, but a
bit messy.

I would like to hear from others how they implement markup directives
with the upload form.

In the case of Triad skin, instead of using markup, you could use this
in config.php, which will be implemented for the whole wiki:

# suppress left and right bar for upload form
if ($action=='upload') {
    $LeftToggleFmt = "";
    SetTmplDisplay('PageLeftFmt',0);
    $RightToggleFmt = ""; 
    SetTmplDisplay('PageRightFmt',0);
}

But if you wanted no left and right bars anywhere, in any cases, you
could just use:

# suppress left and right bars anywhere allways
    $LeftToggleFmt = "";
    SetTmplDisplay('PageLeftFmt',0);
    $RightToggleFmt = ""; 
    SetTmplDisplay('PageRightFmt',0);

and not bother with the noleft and noright directives in AllGroupHeader.

  ~Hans




More information about the pmwiki-users mailing list