Ok so far so so...
I have added the Tracking JavaScript to the site-to-xhtml.xsl file.  And that seems to be working fine.
I have added the variable to my skinconfig.xml file in the project directory, And finally I have been looking
at how to pull the variable out of the skinconfig.xml and use it in the site-to-xhtml.xsl as a variable.


However, when I go to build the site I get the following Error:

validate-skinconf:
/home/bryce/repos/brycealcock/brycealcock.com/src/documentation/skinconf.xml:64:21: Element type "project-tracking" must be declared.
/home/bryce/repos/brycealcock/brycealcock.com/src/documentation/skinconf.xml:438:14: The content of element type "skinconfig" must match "(search?,disable-print-link?,disable-pdf-link?,disable-pod-link?,disable-txt-link?,disable-xml-link?,disable-external-link-image?,disable-compliance-links?,obfuscate-mail-links?,obfuscate-mail-value?,disable-font-script?,project-name?,project-description?,project-url?,project-logo,group-name?,group-description?,group-url?,group-logo?,host-url?,host-logo?,favicon-url?,disable-copyright-footer?,year?,vendor?,copyright-link?,trail?,toc?,headings?,feedback?,motd?,extra-css?,colors?,pdf?,credits?)".

BUILD FAILED


So it is obviously getting validated against a DTD or something, and does not like the fact that I added the
<project-tracking>PCDATA</project-tracking>

So I need more help.

Bryce


On Tue, Sep 21, 2010 at 7:49 AM, Steve Wolke <Swolke@roughbros.com> wrote:

Bryce,

 

I think this will work.

 

You could add the google analytics code in the  <xsl:template match="site"/> of the common skin file ‘site-to-xhtml.xsl’ in the directory ‘main\webapp\skins\common\xslt\html’ with a variable for the tracking site ID  hat will come from the skinconfig.xml file.  Then put your tracking site ID in the skinconfig.xml file on some new created element and modify the ‘skinconf.xsl’ in the directory ‘main\webapp\skins\common’ to make sure that you handle defaults properly.

 

Steve

 

 

From: Bryce Alcock [mailto:u912boilermaker@gmail.com]
Sent: Monday, September 20, 2010 3:01 PM
To: user@forrest.apache.org
Subject: Tracking Codes and Java Script

 

 

I was wondering if there was a simple and systematic way to configure a tracking code into Forrest, for every page.

 

So for a concrete example I would like to add a

Google Analytics tracking code to the bottom of each page.

 

Currently I am having to do this by modifying files in the Forrest directories.

(This works file with the exception that I have 2 forrest project and I have to keep remembering to change these files...)

 

I would like to just be able to specify a tracking code and style or possibly an html/javascript segment,

in a Config file such as site.xml or something like that.

 

 

Bryce