In blojsom, you can specify a certain template to be loaded for a particular flavor. This may be useful for presenting information relevant in a particular context.
For example, the default installation uses a different template for the HTML flavor when presenting comments and trackbacks left for a particular blog entry. You will notice that if you click on the link for the number of comments or trackbacks, that a URL parameter page= is added to the URL for a given entry. Depending on the name given in the URL parameter, blojsom will load the page-specific template.
The page-specific template loading uses the following lookup procedure.
- If the page URL parameter is specified, blojsom will look for:
flavor_template-page.flavor_extension
- If the page URL parameter is not specified, or the flavor_template-page.flavor_extension file is not found, blojsom will look for:
flavor_template.flavor_extension
 | About the example
- blojsom's default flavor is HTML and is presumed if not given in the following examples.
- Assume blojsom's default to use Velocity templates in the following examples.
- The main template file for the HTML flavor is html.vm.
|