Ok, Thanks Jonh. I am working behind a intranet. Give me a few hours to arrange a Live Link.
I'll get back to you later on Regards, Edwin On Thu, Feb 26, 2009 at 2:14 AM, <john.ran...@affinity.co.nz> wrote: > > From: edwin marte <edwin.ma...@leidba.com> > > Subject: Re: [pmwiki-users] wikiform ptv change > > > > I am Re-Posting, > > Anybody ? > > Sorry for the slow response -- I had a busy few days. > >> > >> Another question has come to my mind. We are implementing some searching > >> mechanism to our wikilist (as Peter Bowers recipes > >> http://www.pmwiki.org/wiki/Cookbook/WikiFormsRecipes ). Everything is > >> working and everything is being done manually. We kind of want to get > >> some > >> statics from the wikilist so we want to be able to access 'count' value > >> as a > >> ptv if possible. > >> > >> The wikiform recipe mentioned that a count value was added (2006), we > >> imagine that this value is the one shown at the bottom of the wikilits > >> with > >> the count of record found. Is there a way where I can use/pass the > >> value to > >> a PTV ? (if no possible already) > > I think I understand exactly why you wish to do this, but cannot see an > easy way to achieve it. at first glance. The difficulty is that the > wikilist > directive has to be evaluated to count how many pages meet the search > criteria. > > You are correct that this is the count value referenced in the revision > history for the recipe. > > The best idea I can come up with is a custom (:wikilistcount:) directive > that does everything (:wikilist:) does except display a list! So we would > modify the code to check if "count" is specified and if so, empty the > output buffer before we output the count. > > The alternative (thinking out loud) would be to create a PTV function > that extracts a (:wikilist:) expression from a page, runs it in a special > (:wikilistcount:) mode, and have this special mode return just the > count number. > > However, I don't see how either of these approaches can be made to > work in conjunction with Peter's searching mechanism, because the > wikilist doesn't know the search criteria until a searcher submits a > search form. > > So I think the answer is that if your wikilist directives are static data, > it *may* be possible, but if they are dynamic based on a searcher > filling in a form, I am struggling to see a way to do it. > > Is it possible for me to see what you are doing? Maybe I will think > of something if I see a live example (and maybe not, of course). > Can you send me a link? > >> > >> I apreciate any information you may or anybody else give me in this > >> matter, > >> > >> Our best regards, > >> Edwin > >> > JR > > >
_______________________________________________ pmwiki-users mailing list pmwiki-users@pmichaud.com http://www.pmichaud.com/mailman/listinfo/pmwiki-users