[pmwiki-users] Setting up other folders [From: Archiving old/obsolete pages]

Patrick R. Michaud pmichaud at pobox.com
Sat Sep 2 12:01:23 CDT 2006


On Fri, Sep 01, 2006 at 04:18:12PM -0400, The Editor wrote:
> Hi all.
> 
> Your suggestion, Pm, about setting up an archive folder made me wonder
> how hard it would be to put all the data files the FAST Data recipe
> creates in a "data" folder.  I currently read protect them but would
> want admin access to them for fixing/tweaking data as needed.  I would
> also want them searchable, though it would be PERFECT if the return
> values were the exact parallel pages in the current wiki folder rather
> than the ones in the data folder.  Is that possible?  ie:  a hit in
> data/Test.SomePage would return a link to wiki.d/Test.SomePage.

What exactly do you mean by a "hit in data/Test.SomePage"?  You mean
you want pageindex to search the text of data/Test.SomePage 
as well?

Personally, I wouldn't try doing this with separate folders --
I'd use specialized pagenames, where the data for Test.SomePage
goes into Test.SomePage-Data.  Then we can tell the difference
between data and pages directly from the pagename, rather than
trying to infer it from its storage location (which non-administrators
never see anyway).

It also makes it easy to do searches of only data or non-data pages:

    (:pagelist name=*-Data:)        # only data pages
    (:pagelist name=!*-Data:)       # only non-data pages

    $SearchPatterns['normal'][] = '!-Data$!';   # exclude -Data pages from output

To link the data page to its parallel, there could be a {$BaseName}
page variable that converts things like "Test.SomePage-Data" into 
"Test.SomePage" ({$BaseName} is likely to be in the core soon anyway).

So, it's then possible to do things such as "return me all of the wiki
pages which have a parallel data page containing the term 'xyz'":

    (:pagelist name=*-Data 'xyz' fmt=#parallel:)

    [[#parallel]]
    * [[{$Group}/{$BaseName}]]
    [[#parallelend]]

The pagelist generates a list of "-Data" pages containing 'xyz', the
fmt=#parallel displays that list with the "-Data" suffix stripped 
from each pagename.

Pm


> On 8/30/06, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> > Another approach might be to have an archive.d/ directory (analogous
> > to wiki.d/ and wikilib.d/ ) where page files get moved when they're
> > archived.  Then we simply let pagelist and search skip over archive.d/
> > when looking up pages.  Everything else then works the same.
> 
> _______________________________________________
> pmwiki-users mailing list
> pmwiki-users at pmichaud.com
> http://www.pmichaud.com/mailman/listinfo/pmwiki-users
> 




More information about the pmwiki-users mailing list