forrest-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Wolke" <>
Subject RE: Tracking Codes and Java Script
Date Fri, 24 Sep 2010 15:43:42 GMT


You can turn off validation of the skinconfig.xml in the
file like the following



# validation properties


# This set of properties determine if validation is performed

# Values are inherited unless overridden.

# e.g. if forrest.validate=false then all others are false unless set to











Then to get your property you can just call


<xsl:value-of select='//skinconfig/project-tracking'/>





From: [] On Behalf
Of Bryce Alcock
Sent: Friday, September 24, 2010 1:30 AM
Subject: Re: Tracking Codes and Java Script


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:



:64:21: Element type "project-tracking" must be declared.

:438:14: The content of element type "skinconfig" must match





So it is obviously getting validated against a DTD or something, and does
not like the fact that I added the



So I need more help.





On Tue, Sep 21, 2010 at 7:49 AM, Steve Wolke <> wrote:



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.





From: Bryce Alcock [] 
Sent: Monday, September 20, 2010 3:01 PM
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

(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.





View raw message