forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <>
Subject Re: using Subversion keyword substitution instead of published date in skin navstrip
Date Sat, 31 Mar 2007 22:24:00 GMT
Brolin Empey wrote:
> Thanks for the suggestions.
> I missed the FAQ about the CVS keywords because I was searching the
> FAQ page for SVN terms.
> I already knew that the "Last Published" line was written by
> client-side JavaScript code.  This led me to believe that client-side
> scripting was used because it was not possible to include
> page-specific properties in the output of the skinning process.  I
> decided to ask on this list in case my assumption was incorrect.
> For now, I have settled on using the SVN "Id" keyword in the body of
> each page.  This is not as elegant of a solution as having the
> expansion of the "Id" keyword in the skin, since it means there is a
> chance of having a page without the "Id" keyword.  However, my
> solution is still better than the "Last Published" line, because the
> latter always prints the current date and time on my public Web site.
> This is misleading and not useful.  It is much more useful and
> meaningful to me to have the date and time the source file was last
> modified.
> Here is what I did:
> In main/webapp/skins/pelt/xslt/html/site2xhtml.xsl I used a test that

You should not be editing the skin provided by Forrest. the reason 
being, if you upgrade to a later version of Forrest you will have to 
re-apply your changes. Thus you are creating a maintenance problem for 

Forrest has a mechanism to allow you to create your own skins in order 
to help with this problem. I linked to an introductory doc on this in my 
original reply. If you need more details than you can find in the docs 
then ask away.

> I would still be
> interested if someone finds a way to put the "Id" keyword in the skin
> (more specifically, in the footer), though.

You're nearly there. The footer is generated by the site2xhtml.xsl, 
search for "start Footer" to find the relevant part.

This XSL has lots of information available to it, including the body 
content (obviously).

What you need to do is, rather than add the date to the body of the 
content, you need to add it as meta-data, then processes this meta data 
in site2xhtml.html

How is meta-data handled in 0.7? I'm afraid I can't remember, I have a 
feeling it is handled very badly in 0.7. The good news is that we are 
rapidly working towards a 0.8 release (no really, it should be out 
*very* soon - see recent activity on the dev list to be convinced. In 
0.8 there is much better handling of meta data.

Therefore, my recommendation is to stick with what you have for now, 
then when 0.8 is released and you have upgraded, ask your question again.


View raw message