On 19-02-2009 at 16:28:35 <php...@jakeman.plus.com> wrote:

Added that and PHP no longer dies. But I still can't get the Prefilter to
change the output even if I totally replace the source using:

<?php
require_once 'PHPTAL.php';
require_once 'PHPTAL/Filter.php';
class MyPreFilter implements PHPTAL_Filter {
  public function filter($source){
    return "<html><body>filtered content</body</html>";
  }
}

$tpl = new PHPTAL('mytemplate.html');
$tpl->setPreFilter(new MyPreFilter());
echo $tpl->execute();
?>

It would really help if I can see a sample that's known to work.

Ah, that's a bug I've fixed last month :)

You need to make PHPTAL re-parse the template, otherwise changes in prefilter 
won't be noticed (touch the file or clear cache in /tmp).

--
regards, Kornel



_______________________________________________
PHPTAL mailing list
PHPTAL@lists.motion-twin.com
http://lists.motion-twin.com/mailman/listinfo/phptal

Reply via email to