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
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to