Changes

Jump to navigation Jump to search
m
Added Template:Note box and Template:Warning box
Line 13: Line 13:     
The template fragments are concatenated together in <span class="emphasis">''ASCIIbetical''</span> order (US-ASCII sort order) and the complete file is parsed to generate the appropriate configuration files for the service. The use of fragments is part of the SME Server's modular and extensible architecture; it allows third-party modules to add fragments to the configuration where necessary.
 
The template fragments are concatenated together in <span class="emphasis">''ASCIIbetical''</span> order (US-ASCII sort order) and the complete file is parsed to generate the appropriate configuration files for the service. The use of fragments is part of the SME Server's modular and extensible architecture; it allows third-party modules to add fragments to the configuration where necessary.
 
+
{{Note box|msg=It is also possible to store templates as single files, rather than as a directory of fragments. This method is preserved for backwards compatibility, but does not provide the extensibility of directory based templates. Directory templates should be used for all new templates, even if that directory only contains a single fragment.}}
<div class="NOTE"><blockquote class="NOTE">
+
</div><div class="SECT1">
 
  −
'''Note: ''' It is also possible to store templates as single files, rather than as a directory of fragments. This method is preserved for backwards compatibility, but does not provide the extensibility of directory based templates. Directory templates should be used for all new templates, even if that directory only contains a single fragment.
  −
 
  −
</blockquote></div></div><div class="SECT1">
   
----
 
----
   Line 124: Line 120:  
  template-begin-html  template-begin-php
 
  template-begin-html  template-begin-php
 
  template-begin-pam  template-begin-shell
 
  template-begin-pam  template-begin-shell
 
+
{{Note box|msg=You may also need a <tt class="FILENAME">templates.metadata</tt> configuration file if your generated file needs to be executable.}}
<div class="NOTE"><blockquote class="NOTE">
+
</div><div class="SECT2">
 
  −
'''Note: '''You may also need a <tt class="FILENAME">templates.metadata</tt> configuration file if your generated file needs to be executable.
  −
 
  −
</blockquote></div></div><div class="SECT2">
   
----
 
----
   Line 135: Line 127:     
Template fragments are assembled in ASCII-betical order, with two exceptions: template-begin always comes first, and template-end always comes last. Template fragments are often named to start with a two digit number to make the ordering obvious, but this is not required.
 
Template fragments are assembled in ASCII-betical order, with two exceptions: template-begin always comes first, and template-end always comes last. Template fragments are often named to start with a two digit number to make the ordering obvious, but this is not required.
 
+
{{Note box|The number of fragments and the order of those fragments within a template directory is subject to change between releases.}}
<div class="NOTE"><blockquote class="NOTE">
+
</div><div class="SECT2">
 
  −
'''Note: '''The number of fragments and the order of those fragments within a template directory is subject to change between releases.
  −
 
  −
</blockquote></div></div><div class="SECT2">
   
----
 
----
   Line 155: Line 143:     
It is possible that the standard templates are not correct for a particular installation, and so the local system administrator can override the extsing templates by placing files in the <tt class="FILENAME">templates-custom</tt> tree. This is a parallel tree to the normal templates hierarchy, and is normally empty. There is also a <tt class="FILENAME">template-user-custom</tt> tree for overriding entries in the templates-user tree.
 
It is possible that the standard templates are not correct for a particular installation, and so the local system administrator can override the extsing templates by placing files in the <tt class="FILENAME">templates-custom</tt> tree. This is a parallel tree to the normal templates hierarchy, and is normally empty. There is also a <tt class="FILENAME">template-user-custom</tt> tree for overriding entries in the templates-user tree.
 +
{{Warning box|msg=''Never edit the standard templates.'' Your changes will be overwritten when packages are upgraded.}}
   −
<div class="NOTE"><blockquote class="NOTE">
+
{{Note box|msg=The template-custom trees should be reserved for local system overrides. ''Software should not install files in this tree.''}}
 
  −
'''Note: '''<span class="emphasis">''Never edit the standard templates.''</span> Your changes will be overwritten when packages are upgraded.
  −
 
  −
</blockquote></div><div class="NOTE"><blockquote class="NOTE">
  −
 
  −
'''Note: '''The template-custom trees should be reserved for local system overrides. <span class="emphasis">''Software should not install files in this tree.''</span>
  −
 
  −
</blockquote></div>
      
If a templates-custom entry exists for a template, it is merged with the standard templates directory during template expansion, using the following rules:
 
If a templates-custom entry exists for a template, it is merged with the standard templates directory during template expansion, using the following rules:
Line 354: Line 335:  
     [...]
 
     [...]
 
  }
 
  }
 
+
{{Note box|msg=Software which was written for SME Server before release 7 will have a number of scripts which call <tt>processTemplate</tt>. In almost all cases, these can be replaced with simple flag files in the <tt>templates2expand/</tt> directory of the relevant events. The new method is '''far''' more efficient as a single invocation is perl is used to expand all template files.}}</div></div></div>
<div class="NOTE"><blockquote class="NOTE">
  −
 
  −
'''Note: '''Software which was written for SME Server before release 7 will have a number of scripts which call '''processTemplate'''. In almost all cases, these can be replaced with simple flag files in the <tt class="FILENAME">templates2expand/</tt> directory of the relevant events. The new method is <span class="emphasis">''far''</span> more efficient as a single invocation is perl is used to expand all template files.
  −
 
  −
</blockquote></div></div></div></div>
 

Navigation menu