Templates are how you generally define the layout of your site. A template
will often contain HTML content that describes the main navigation, the site
banner and anything that you might expect to see on every page. Templates
almost always will include the <jinn:main/> tag. This is how TemplateJinn knows where to place the
actual content for the template. When it comes across this tag it will expand
the matching source content at that spot. All of your templates should be
located somewhere in the file hierarchy located in the subdirectory defined by
the project configuration variable:
$GLOBALS['interJinn']['compileTemplatePath']
The template retrieval system supports a multilingual
hierarchy. If you have declared your project as multilingual via the
multilingual configuration variable, then the retrieval system will attempt to
resolve the correct language template. The process that occurs is to first
check for the template file in a subdirectory by the name of the current
language, if that fails then fall back on the original path. To clarify the
point - if the current language were fr and you
had the following template path:
/navigation/admin/secondary.template
Then the retrieval system will first attempt to load the template from the following path:
/navigation/admin/fr/secondary.template
If the template was not found then the system would fall back on the original path for retrieval. By using this mechanism an entire multilingual site can be defined if the content and templates are located in the appropriate language directories, then the site will compile all language versions without the need for any special logic other than what is contained within the templating system.