On 5/24/05, Brian Sullivan <[EMAIL PROTECTED]> wrote:
> I am trying to determine if (and where) the Last-Modified http header
> is set in CoreBlog(1.11).
>
> If it is not set (and it seems that is the case) can anyone suggest a
> strategy/code for settting it?
>
> I am thinking it should be set to the date of the latest entry to be
> presented probably by code in the entry_body method that compares the
> entry date to the current setting of the header entry and resets the
> header if it is not currently set or if it is older than the current
> entry.
>
OK -- I have had a look at this in more detail and have come up with a
couple of issues.
entry_body seems like the right place to do this.
I have added this to entry_body:
<dtml-if modifieddateset>
<dtml-else>
<dtml-call
"RESPONSE.setHeader('Last-Modified',date_created().toZone('GMT').rfc822())">
<dtml-call "REQUEST.set('modifieddateset',1)">
</dtml-if>
It is not ideal though --this sets Last-Modified to the creation date
of the first entry on the page (I would like it to be the latest entry
as there could be more than one and the sort order is not always the
same but can't figure out how to get that to work). Also I believe the
date format is supposed to be RFC1123 not rfc822 -- anybody have any
strategy to get RFC1123 dates?
_______________________________________________
COREblog-en mailing list
[email protected]
http://postaria.com/cgi-bin/mailman/listinfo/coreblog-en
Unsubscription writing to [EMAIL PROTECTED]