[pmwiki-users] PageLists of database contents
Américo Albuquerque
aalbuquerque at lanowar.sytes.net
Wed Oct 4 16:54:45 CDT 2006
Patrick R. Michaud wrote:
(...)
>
> Well, this is why there's a "1." in front of my "Create a custom
> PageStore object ..." step above. Step "2." is to get MakePageList
> to be able to determine the set of pages without having
> to call the ls() method. :-)
>
Can MakePageList be changed? is it called by a variable, like other
functions in pmwiki?
> Note that you've now literally reached the bleeding edge of PmWiki
> core development-- the hooks to allow custom inputs and filters to
> MakePageList didn't even exist in PmWiki as of a week ago. But that's
> really a good thing, as it's always better to have real implementation
> issues at hand when doing design and development.
>
Is there any page where we can get this info? Like, what do I need to
change the storage of pages, what do I need to change page names
schematic, group names, etc?
There are some functions I knew about by reading other recipes.
>> ... I want to be able to use PageList's
>> powerful searching syntax and templates, but without the overhead of
>> converting every single record into text and back again. Suggestions?
>
> The key to making this more efficient will be to reduce the
> overall number of "pages" (records) that MakePageList has to perform
> its searches on. I'm thinking the best approach to this will
> be for us to provide either (1) options to ListPages() and ls()
> or (2) alternate methods entirely so that we can tell a
> PageStore/DataStore object "we want the names of 'pages' that
> might match these criteria" as opposed to "give me a list of
> all pages". Then we can optimize things quite a bit.
>
How does the search work? does it use a function for each action or does
it have a search function? A workaround would be to make a special
"search" function for that particular DataStore
> I'm also needing to re-think a few of PmWiki's internals here,
> especially the $PCache array. PmWiki uses $PCache in a large
> number of places to try to avoid doing much in the way of
> "redundant" I/O, but it's been done haphazardly without any real
> overarching design. I wasn't planning to revamp $PCache for
> 2.2... but with the pagelist and page variable changes it's
> becoming far more relevant, and it might be worth making the
> change now (as part of a "major release") than to postpone
> the pain until later when more modules may be depending on
> the existing haphazard design.
>
What does $PCache saves? the entire page array?
>> Second, if you try searching the Source group at
>> http://www.workscited.net/ben/Site/Search , it doesn't appear to search
>> page text variables... which was the whole point of putting the records
>> in that format. For example, search for $:firstname=Will. No dice,
>> although you can see by clicking the editing link above that record 12's
>> firstname is Will. I'm using 2.0.0-beta-9. Ideas?
>
> Not at the moment -- seems like it ought to work. What if
> you just use a page text variable directly in a page, as opposed
> to going through (:pagelist:) to get it -- does it correctly
> grab values of {$:firstname} for records in the Source group?
>
> I.e., does {Source.12$:firstname} work?
>
Américo Albuquerque
More information about the pmwiki-users
mailing list