On 16-11-2008 at 13:01:31 Maciej Łebkowski <[EMAIL PROTECTED]> wrote:

I am doing some content negotiation in my application. In particular,
i`m settign LastModified, ETag, etc headers, and checking if content
is modified (and returning 304 response if its not).

Now I have:
$LastModified = isset($data['LastModified']) ? $data['LastModified'] : null;

But I didn`t take into account any template changes. Is there
a way to get the maximun filemtime() of all used templates?

There's no method for it, but it's easy to add it. In PHPTAL class add:

function getLastModifiedTime()
  return $this->_source->getLastModifiedTime();

This will give time of main template. If you want time for all templates, you'll need to change executeMacro() or setConfigurationFrom() methods.

regards, Kornel

PHPTAL mailing list

Reply via email to