[pmwiki-users] Multiple Questions

Patrick R. Michaud pmichaud at pobox.com
Mon Mar 6 00:20:25 CST 2006


On Mon, Mar 06, 2006 at 12:28:32AM -0500, Bronwyn Boltwood wrote:
> On 3/5/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > On Sun, Mar 05, 2006 at 09:14:20PM -0500, The Editor wrote:
> > > 2. Is there anyway to link to a non-existant page and have it go
> > > (create &) view that page, rather than going to the edit page? The
> > > newpageboxplus script has that capability--but I would like the code
> > > for a link.
> 
> While I don't know how this and the spiders will get along, you can
> also use Hans' little trick:
> 
> [[Group.Page?action=dummy | Link Text]]
> 
> ?action=dummy doesn't exist, but Pmwiki treats any actions it does not
> know as action=browse. 

Even better is to use ?action=browse instead of ?action=dummy.  :-)

> > > 3. Related question: any way to set a conditional based on whether or
> > > not a page exists?
> >
> > That's another one that is "coming soon".
> 
> In the meantime, put this into config.php:
> 
> $Conditions['exists'] = "PageExists(\$condparm)"; # adds (:if exists
> SomeGroup.SomeName:)
> 
> Pm, I'm glad you're adding that one to the core -- it's useful!

Yes, but in the final implementation I'm expecting it to be wildcarded,
so that one can do things like

    (:if exists Group.*:)              # does group exist?
    (:if exists Calendar.2006-03-*:)   # any pages in March 2006?

Pm




More information about the pmwiki-users mailing list