We’d like to minimise the time spend on maintaining our freemarker templates on an install. By symlinking the template files from the parent meta collection, to all it’s child collections, we can just maintain the templates in the meta collection.
The approach you’ve described above is quite workable, but you may want to consider locking down user administrative privileges on the component collections, preventing an Template Editing User from making an edit to a component collection and having those changes cascade to all linked collections’ templates.
Symlinking of config files across collections isn’t always required - other collection-level settings can be used to define shared sources of certain configuration items. Examples include:
It’s also worth noting that, when creating a profile within a collection (component or meta), the parent collection’s current FTL files are NOT used as starting points - the global default templates are used instead.
From Freemarker level, instead of symlinks, it would be better to use Freemarker “include” directive (http://freemarker.org/docs/ref_directive_include.html), for example:
in /test-web2/_default/custom.ftl file add this: <#include "../../test-web/_default/custom.ftl" />
or more general approach, to include profile parameter: <#include "../../test-web/${question.profile}/custom.ftl" />
The other downside of symlinks is that there is no obvious cue that the file is symlinked - meaning it might inadvertently get edited and the edit will affect every template that is symlinked. Having the include makes it clear that the template is being shared and that if customisation occurs it forks the template.