[pmwiki-devel] MakeLink and Automatic category pages

Patrick R. Michaud pmichaud at pobox.com
Mon Jul 7 10:40:44 CDT 2008


On Mon, Jul 07, 2008 at 11:32:27AM -0400, DaveG wrote:
> 
> 
> Patrick R. Michaud wrote:
> >On Mon, Jul 07, 2008 at 12:03:06AM -0400, DaveG wrote:
> >$AutoCreate only creates pages if a page is saved that has a link to the
> >specified group/pagename.  In other words, the setting above says
> >that if a page is saved that contains a link to a page in the 
> >Unphotographed
> >group, automatically create that target page at the same time.
> >Note that auto-creation only occurs when a page is being saved,
> >not when a link is displayed (so links in a GroupFooter only auto-create
> >pages at the time when the GroupFooter is saved).
> That helps. Once I work out where to put it, I'll add it to the wiki.
> 
> >There are a number of ways to get empty pages to change the default
> >displayed text, most are controlled by the $DefaultPageTextFmt variable
> >For example, you can set
> >
> >    $DefaultPageTextFmt = 
> >      '(:include {$Group}.PageNotFound {$SiteGroup}.PageNotFound:)';
> >
> >which causes a non-existent page to display 'PageNotFound' from the
> >current group if it exists, and use Site.PageNotFound otherwise.
> >Thus you could create Unphotographed.PageNotFound and that text
> >would be used for any non-existent pages in the Unphotographed group.
> >
> >You can also have a per-group customization file that sets the
> >value of $DefaultPageTextFmt .
> This sounds like what I need. How is the per-group customization done?

Create local/Unphotographed.php, and then

    <?php
      $DefaultPageTextFmt = '...default text here...';

See http://www.pmwiki.org/wiki/PmWiki/PerGroupCustomization .


> >As far as making it appear that pages in the Unphotographed group
> >always exist (even when they don't), several possibilities have been
> >discussed but I haven't been comfortable with any of them to adopt
> >them directly.
> In this case, they don't really need to exist -- they simply need to 
> appear to exist.

Well, that's sorta what I meant -- making pages "appear to exist"
when they really don't.  

Pm



More information about the pmwiki-devel mailing list