[pmwiki-users] if page exists

John Rankin john.rankin at affinity.co.nz
Mon Mar 6 16:39:46 CST 2006

On Tuesday, 7 March 2006 11:13 AM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>On Tue, Mar 07, 2006 at 11:06:30AM +1300, John Rankin wrote:
>> On Tuesday, 7 March 2006 4:52 AM, noskule at gmx.net wrote:
>> >>do i still need the entry below in the config file?
>> >>
>> >>$Conditions['exists'] = "PageExists(\$condparm)"; # adds
>(:if exists SomeGroup.SomeName:)
>> >
>> FYI: this will conflict with PublishPDF's PDF output channel.
>> This adds, for PDF requests only, a "MultiPageExists"
>> (:if exists SomePage Anotherpage OrAnother:)
>> This is required to support the opening and closing print notices,
>> so that a group notice can override a Site notice.
>Oops.  The version of pmwiki-2.1.beta36 that I just released also
>added the (:if exists:) markup, albeit for a single non-wildcarded
>I looked through the PublishPDF's source for its definition of
>(:if exists:) but couldn't find it.  

It's part of the (:notice:) markup at the end of
wikipublisher/latex/altmarkup.php and used in the latexpublish.tmpl
so it only introduces a (:notice:) tag if a notice page exists.

It may get used elsewhere, but I can't remember...
>If PublishPDF defines $Conditions['exists'] forcefully (i.e., not
>through an SDV() call) then it will override pmwiki-2.1.beta36's
>definition without loss of functionality.  If PublishPDF uses SDV,
>then I probably need to fix the distribution.

It defines assertively, without SDV, so we are OK. 
>The long-term goal of the builtin (:if exists ...:) will be to
>handle both wildcards *and* multiple page existence tests.
>If it's important that this get resolved quickly, I'll see
>about writing it for the next release.

As far as I can see, there is currently no conflict, as
PublishPDF's MultiPageExists correctly interprets
(:if exists SomePage:)

However, when you add wildcards, things will break.

John Rankin

More information about the pmwiki-users mailing list