[pmwiki-devel] PageStore precedence for reading & writing

Ben Stallings Ben at InterdependentWeb.com
Sun Nov 5 11:54:31 CST 2006


I've run into a conceptual snag in getting my DataStore object (core of 
the DataQuery recipe) to write page data to a database record.

In order to get the read behavior I want, I've got the DataStore 
object(s) defined after the PageStore objects in $WikiLibDirs... that 
is, the wiki looks for a page first in wiki.d, then in wikilib.d, and 
then at last in the database(s).  This makes it very easy to override 
the default templates and such that DataQuery generates: you just edit 
the template and save it as a local page, and from then on your template 
is used instead of the generated one.  Works great.

The problem is that when I actually want to save data to a database 
record, it gets saved to a local page instead... the write command never 
gets sent to the DataStore object because the first PageStore object 
takes care of it.

What would you suggest as a solution or workaround?  Should I define 
$WikiLibDirs differently depending on the current $pagename?  Or is 
there a more elegant way to go about it?  Thanks in advance!  --Ben S.



More information about the pmwiki-devel mailing list