[pmwiki-users] Multiple Questions

Bronwyn Boltwood bronwyn at bronwynb.info
Sun Mar 5 23:28:32 CST 2006

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. Since 2.1 beta 26, links with ?action
parameters get treated as existing links (no question mark), even when
the page doesn't exist.

> > 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

Pm, I'm glad you're adding that one to the core -- it's useful!

> > 4. Any way to set a sidebar (actually a rightbar) to show up only
> > whenever the action=edit? I'd like a little markup cheatsheet down the
> > right column whenever someone edits a page.
> Change the Site.EditForm to include a sidebar that appears on the right.
> This can be done with a table or a floating section.
>     >>rfloat<<
>     (:include Site.Cheatsheet:)
>     >><<

I was going to suggest something complicated with <body
class="$action"> and CSS, but go with Pm's suggestion; it's much
simpler.  You may want to find or create a style hook so that you can
control the size and appearance of the sidebar.


More information about the pmwiki-users mailing list