[Pmwiki-users] Publishing a WikiTrail (or a WikiBook)

John Rankin john.rankin
Tue Aug 5 15:15:35 CDT 2003


> Pm wrote:
> > Idea #1:  I can do something like this even without the '?' parsing--
> > basically if none of the pages in "wiki:page1 page2 page3" exist, then
> > it prints the contents of a $PrintWikiNotFoundFmt variable, and has
> > some $-substitution set to the name of the last page in the list.  By 
> > default $PrintWikiNotFoundFmt would be empty, which would keep the
> > current semantics.
> 
> ---
> That works for me! Yes, please. So I just write
>     $PublishList[] = "wiki:$pages[$i]";
> and set $PrintWikiNotFoundFmt. Cool!

Done, implemented in pmwiki-0.5.16.  However, I changed the variable
name to be $PrintWikiPageNotFoundFmt to match the function name more
closely.  :-)

Pm
----
Great!
I will update publish.php to use this syntax, but leave the existing code commented out. Then I'll add an entry to the Cookbook. People who use an earlier version of pmwiki and want to use the Publish button can switch the comments around to apply the older code version.

I had an enhancement request to make it put out list items that aren't trail stops using the text of the item as a heading (with any wiki markup correctly rendered). So:

* Introduction
** PageA
** PageB
* The first subject
** PageX
** PageY

produces (with a bit more formatting):

<h1>1 Introduction</h1>
<h1>1.1 PageA</h1>
text of PageA
<h1>1.2 PageB</h1>
text of PageB
<h1>2 The first subject</h1>
<h1>2.1 PageX</h1>
text of PageX
<h1>2.2 PageY</h1>
text of PageY

JR






More information about the pmwiki-users mailing list