[pmwiki-users] noleft in SiteHeader suppresses leftbar except for page-actions (mostly)

michael paulukonis xraysmalevich at gmail.com
Thu Sep 5 22:23:22 CDT 2013


Thanks -- I'll give it a try this weekend.

-Michael Paulukonis
http://www.xradiograph.com
 <http://goog_2112721603>Interference Patterns (a
blog)<http://www.xradiograph.com%5Cinterference>
@XraysMonaLisa <https://twitter.com/XraysMonaLisa>
http://michaelpaulukonis.com
<http://www.BestAndroidResources.com>

Sent from somewhere in the Cloud
(hearthrug, by the fender)


On Thu, Sep 5, 2013 at 10:28 PM, John Rankin <john.rankin at affinity.co.nz>wrote:

>  On 6/09/13 1:12 PM, michael paulukonis wrote:
>
>    Hrm.
>
>  If I put SetTmplDisplay('PageLeftFmt', 0) in config or the skin, it
> ALWAYS surpresses the left-content.
>
>  I would like it to be suppressed when the (:noleft:) markup is present on
> the page, or in the header.
>  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.
>
>  Is there a way to get a Header (Group or Site) enabled for edit, diff,
> history, login, etc?
>
> I think it can be done with a modification to the skin. The template file
> format includes the option
>
> <!--function:SomeFunction args-->  This directive calls a PHP function
> named "SomeFunction", passing the current page's name and the text
> following the function name as arguments. PHP functions called in this
> manner are typically defined in a local customization file.
>
> Suppose the template includes:
>
> <!--function:HideLeftColumn $Group.GroupHeader Site.GroupHeader-->
>
> The function HideLeftColumn would need to read $Group.GroupHeader (if it
> exists) and if it doesn't exist, read Site.GroupHeader (if it exists). Look
> for (:noleft:) in the page text and if found, execute
> SetTmplDisplay('PageLeftFmt', 0);
>
> There is a very small performance hit because pmwiki will have to parse
> the GroupHeder file twice, but normally this is a small file, so the extra
> overhead is very small.
>
> Note that it will read the GroupHeader even if the body of the page
> includes a (:nogroupheader:) directive, which may not be a desired
> behaviour.
>
> I have not tested this, but I think it should work.
>
> ...
>
> -Michael Paulukonis
> http://www.xradiograph.com
> Interference Patterns (a blog) <http://www.xradiograph.com%5Cinterference>
> @XraysMonaLisa <https://twitter.com/XraysMonaLisa>
> http://michaelpaulukonis.com
>
>
>   JR
>
> --
> John Rankin
> Affinity Limited
>
>
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20130905/59656ff7/attachment-0001.html>


More information about the pmwiki-users mailing list