[Pmwiki-users] PmWiki Addons (and thanks!)

J. Perkins jason at 379.com
Sat Jun 14 20:19:14 CDT 2003


First off, thanks for PmWiki! It has really been a pleasure to work 
with. The changes to the formatting variables in 0.5 have made it very 
flexible and easy to use.

In the process of converting my wikis to pmwiki I created a couple of 
addons, which I thought I would share in case anyone was interested. The 
first ("flexlayout") changes the default formatting variables to allow 
the site appearance to be manipulated with stylesheets, relying less on 
the variables approach. The second ("webmenu") builds on the first to 
allow a left-hand side navigation menu. You can see both in action at:

   http://flatfour.sourceforge.net/pmwiki/pmwiki.php

If there is any interest in these, I can add them to the cookbook. In 
the meantime, you can download them here:

   http://flatfour.sf.net/wikiaddons.tgz

I did run into one problem, which I hope I can explain properly. When 
you [[include]] a file, the included file inherits the variables (like 
$Group, $Title, etc.) from the including page. Because of this I can put 
[[$Edit Edit this page]] in the included file, and clicking it will edit 
the including page, not the included page. Which is what I want. 
However, if I don't use an [[include]] and set up the page layout using 
an array instead, like:

$HandleBrowseFmt = array (
	"headers:",
	&$HTMLStartFmt,
	&$HTMLTitleFmt,
	&$HTMLBodyFmt,
	&$PageHeaderFmt,
	&$TextStartFmt,
	"wiki:\$Group.WebMenu",
	&$TextSplitFmt,
	"function:PrintText",
	&$TextEndFmt,
	&$PageFooterFmt,
	&$HTMLEndFmt
);

...the variables are not inherited, and the [[$Edit]] link above would 
edit the included page, instead of the including page. Whew. Would it be 
possible to make the array behavior match the [[include]] behavior?

Okay, that's all. Thanks again and keep up the great work!

Jason
379





More information about the pmwiki-users mailing list