<div dir="ltr">Petko -- thanks for your detailed response.<br><br>I haven't grokked it all yet (have been working on other tasks while I let this one... percolate? gestate? hibernate? something.)<br><br>I always appreciate your detail.<br>

</div><div class="gmail_extra"><br clear="all"><div>-Michael Paulukonis<br><a href="http://www.xradiograph.com" target="_blank">http://www.xradiograph.com</a><br><a href="http://goog_2112721603" target="_blank"></a><a href="http://www.xradiograph.com%5Cinterference" target="_blank">Interference Patterns (a blog)</a><br>

<a href="https://twitter.com/XraysMonaLisa" target="_blank">@XraysMonaLisa</a><br><a href="http://michaelpaulukonis.com" target="_blank">http://michaelpaulukonis.com</a><br><a href="http://www.BestAndroidResources.com" target="_blank"></a><br>

<br>Sent from somewhere in the Cloud<br>(hearthrug, by the fender)<br></div>
<br><br><div class="gmail_quote">On Sat, Sep 7, 2013 at 5:51 PM, Petko Yotov <span dir="ltr"><<a href="mailto:5ko@5ko.fr" target="_blank">5ko@5ko.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">michael paulukonis writes:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
If I put SetTmplDisplay('PageLeftFmt', 0) in config or the skin, it ALWAYS surpresses the left-content.<br>
</blockquote>
<br></div>
And it can be overridden in a local/Group.php or local/Group.Page.php file with SetTmplDisplay('PageLeftFmt', 1);<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I would like it to be suppressed when the (:noleft:) markup is present on the page, or in the header.<br>
Now, SiteHeader would suggest it is almost always present, but I want to be able to turn it off by wiki-editing the appropriate content.<br>
<br>
Is there a way to get a Header (Group or Site) enabled for edit, diff, history, login, etc?<br>
</blockquote>
<br></div>
These actions are processed differently than the 'browse' action.<br>
<br>
I won't say that this is good or bad, I'll just explain what happens and why it is not easy to do what you want with a directive in a page.<br>
<br>
With "browse" first the page content (including GroupHeader) is converted to HTML, then the skin is rendered section by section -- for example the SideBar and PageActions pages are included in the skin so they are rendered later than the page text.<br>


<br>
The (:noleft:), (:noheader:), (:nofooter:) and other directives set or change variables used by the skin, but need to be set before the concerned skin section is rendered. For example, anything in the page text and in GroupHeader/footer can set a variable and it will be respected. Other example, in a SideBar, setting (:noleft:), (:noaction:) or (:noheader:) will have no effect (these sections are rendered before the SideBar is rendered) but (:nofooter:) will have effect (the skin footer is rendered after the SideBar).<br>


<br>
With the actions edit, diff, login, search, the page text is not rendered to HTML, only a function is registered to be called later by the skin: you can check the variables $HandleSearchFmt, $HandleEditFmt,$HandleDiffFmt, $AuthPromptFmt (some of them are redefined in forms.php).<br>


<br>
So for example when the skin comes to render the diff function, the SideBar has already been rendered and setting a (:noleft:) directive in the $HandleDiffFmt will have no effect on the SideBar.<br>
<br>
So, in order to set the directives before the skin sections are processed, you can set in config.php something like:<br>
<br>
 $HandleEditFmt = array('function:<u></u>UseGroupHeader', &$PageStartFmt,<br>
   &$PageEditFmt, &$PageEndFmt);<br>
<br>
we insert 'function:UseGroupHeader' before the default settings and then we add this function:<br>
<br>
 function UseGroupHeader($pagename) {<br>
   global $GroupHeaderFmt;<br>
   $x = MarkupToHTML($pagename, $GroupHeaderFmt);<br>
   return ''; # returns nothing<br>
 }<br>
<br>
This way, when PmWiki renders the page edit form, the SiteHeader is processed before other sections of the skin and can set some variables. But this function returns nothing, because it is before even the <!DOCTYPE...> start of the HTML page is printed.<br>


<br>
If you have more than (:noleft:) in the SiteHeader, you need to define it twice in $HandleEditFmt :<br>
<br>
 $HandleEditFmt = array('function:<u></u>UseGroupHeader', &$PageStartFmt,   "markup:$GroupHeaderFmt", &$PageEditFmt, &$PageEndFmt);<br>
<br>
here we also added "markup:$GroupHeaderFmt" before &$PageEditFmt. Note that $GroupHeaderFmt must be defined before $HandleEditFmt in config.php.<br>
<br>
The same way you can redefine the other $Handle*Fmt arrays.<br>
<br>
Petko<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">
On Thu, Sep 5, 2013 at 3:24 PM, Petko Yotov <<URL:mailto:<a href="mailto:5ko@5ko.fr" target="_blank">5ko@5ko.fr</a>><a href="mailto:5ko@5ko.fr" target="_blank">5ko@<u></u>5ko.fr</a>> wrote:<br>
<br>
   The GroupHeader mecanism (include specific pages before or after the    current page) is only enabled for the actions "browse" (view), "print" and    "preview" for the current page.<br>
<br>
   If you want to apply the (:noleft:) directive to all actions on most    groups, use this in local/config.php:<br>
<br>
    SetTmplDisplay('PageLeftFmt', 0);<br>
<br>
   To enable it in specific groups, just use in the local/Group.php file:<br>
    SetTmplDisplay('PageLeftFmt', 1);<br>
<br>
   Or, you can also use a different skin.<br>
<br>
   Petko<br>
<br>
<br>
   michael paulukonis writes:<br>
<br>
     I've implemented the AllGroupHeader recipe, with the option of using the      GroupHeader if present, or the SiteHeader otherwise.<br>
     I've added a (:noleft:) directive to the SiteHeader, which eliminates      the leftbar in almost all cases.<br>
     In the few instances where a GroupHeader exists, I have added (:noleft:)      to the GroupHeader.<br>
<br>
     The few cases where the leftbar re-appears are when page-actions are      performed -- Search (results only), History, Login and Edit.<br>
     Curiously, the leftbar disappears again if "preview" is selected during      edit.<br>
<br>
     Why is the leftbar re-appearing?<br>
     Is it something I've set in my theme that I've forgotten about, some      directive I'm missing, some part of core markup that I'm overlooking?<br>
<br>
<br>
<br>
<br>
   ______________________________<u></u>_________________<br>
   pmwiki-users mailing list<br></div>
   <URL:mailto:<a href="mailto:pmwiki-users@pmichaud.com" target="_blank">pmwiki-users@<u></u>pmichaud.com</a>><a href="mailto:pmwiki-users@pmichaud.com" target="_blank">pmwiki-users@<u></u>pmichaud.com</a><br>
   <URL:<a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-" target="_blank">http://www.pmichaud.com/<u></u>mailman/listinfo/pmwiki-</a>   users><a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" target="_blank">http://www.pmichaud.com/<u></u>mailman/listinfo/pmwiki-users</a><br>


<br>
<br>
</blockquote><div class="HOEnZb"><div class="h5">
<br>
______________________________<u></u>_________________<br>
pmwiki-users mailing list<br>
<a href="mailto:pmwiki-users@pmichaud.com" target="_blank">pmwiki-users@pmichaud.com</a><br>
<a href="http://www.pmichaud.com/mailman/listinfo/pmwiki-users" target="_blank">http://www.pmichaud.com/<u></u>mailman/listinfo/pmwiki-users</a><br>
</div></div></blockquote></div><br></div>