[pmwiki-users] Dumb Question.
sti at pooq.com
Thu Oct 5 13:09:43 CDT 2006
Patrick R. Michaud wrote:
> On Thu, Oct 05, 2006 at 12:27:29PM -0400, Stirling Westrup wrote:
>> I've just started working with -Draft and I've run into a minor problem.
>> I've noticed that the list=normal doesn't show drafts, which is usually
>> what I want. However there are a few pages where I want to list the
>> drafts along with the regular pages.
>> What's the best way in PHP to create a $SearchPatterns['drafty'] which
>> is identical to the $SearchPatterns['default'] but removes the lines
>> which exclude pages named *-Draft?
> Did you mean "identical to $SearchPatterns['normal']" here?
> There's not really a good way to create new list= options based
> on existing ones. However, I could make it such that it's easy
> to remove the '-Draft' exclusion from list=normal ... would that
Well, it would work if I could do something like this:
$SearchPatterns['drafty'] = $SearchPatterns['normal'];
Assuming that's even correct PHP. I really do need a version with draft
exclusion, and a version without, sometimes on the same page.
For now I can just create my 'drafty' version by hand and try to keep it
in synch when I add new patterns to the 'normal' version.
It would also be fine by me if I could augment the pages returned by
list=normal in the pagelist command like this:
(:pagelist list=normal group=Group name=+*-Draft:)
In some ways that would even be better, as it would solve another
problem I posted about a week or so ago.
More information about the pmwiki-users