Hello,
I have created a custom statistics module, which seems to work fine. The
last piece of the puzzle is automatically including a FreeMarker
template in all pages. For now I have just added an include to
/templating-kit/templates/main, which works fine, but I would like my
module to be a module that 'just works' for all sites when installed, so
I'd rather not have to modify main.ftl manually after installing my
module. At the same time I'd rather not modify main.ftl if this is not
necessary, since that would mean I'd have to check if I need to update
my module every time STK is updated.
What is the recommended way to solve this? I see two options:
1) Have my module replace main.ftl with a version that includes the
include for my statistics template. How should I do this exactly?
2) Change the Site Definitions ->
default/templates/prototype/templatePath to point to a modified version
of main.ftl which I could store as
/<my-module>/templates/<my-module>.ftl. (Of course I would still need to
check this template when new versions of STK are released.) Should I
change the reference, export the XML and add this to my module's
bootstrap files or should I modify this reference programmatically?
Since we're using EE, I might have to loop over all site definitions,
and new site definitions added after the module is installed, would
still need to be modified manually?
Or is there another, maybe even better, way of accomplishing this include?
Nils Breunese.
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------