Hi Peter,

thanks a lot for your advice. I had a look at Hans’ powertools recipe, but then 
opted for the quick and dirty solution to use (:setSomeVar {=$FullName}:) in 
the pagelist template (together with the markup to translate the directive into 
a global variable) to work around the PTV limitations.

>         if (preg_match_all($pat, 
> IsEnabled($PCache[$pagename]['=preview'],@$page['text']), 
>           $match, PREG_SET_ORDER))
>           foreach($match as $m) {
>             $t = preg_replace("/\\{\\$:{$m[2]}\\}/", '', $m[3]);
>             $pc["=p_{$m[2]}"] = Qualify($pagename, $t);
>           }

Thanks for pointing out this section. Now I do understand, why it’s not 
possible to use PTVs in a pagelist.

Take care
josh



On May/12, 2012, at 1004 , Peter Bowers wrote:

> On Sat, May 12, 2012 at 9:20 AM, <[email protected]> wrote:
> I rewrote the template script into a cookbook script and included it in 
> config.php as Peter suggested. no luck there. apparently the problem is about 
> setting PTVs from within a pagelist.
> 
> Sorry, I wasn't clear in my earlier email.  I wasn't suggesting that you take 
> your existing script (step #2) and put it in config.php and leave the rest of 
> the steps with the pagelist etc.  I was suggesting that you take steps #1 
> through 6 (the whole thing) and place it in a single markup:
> 
> (:mess_with_latestpage groupname varname:)
> 
> Then your script (triggered by the (:mess_with_latestpage ...:) markup) will 
> find the latest page in that group and output all the various markup you are 
> wanting to do.  Since it is a single markup rule you can easily put it early 
> enough to occur prior to the (:title ...:) markup and etc.
> 
> Be aware that you cannot dynamically create PTV-setting markup, so you'll 
> have to have some other way of doing that.if that's something you need...
> 
> For running a pagelist from PHP, check out how Hans did it in powertools.
> 
> -Peter


_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to