$section_template
variable
- $section_template_sectionname
type
- behavioral
associated template variable
- $_navigation
description
This variable specifies the template to use when displaying articles in a specific section.
Vine Type associates templates with articles, not sections. So when more than one article is displayed in a section, Vine Type will choose the template file associated with the "top" or "first" article. Which article is "top" or "first" is dependent on the value you define in your $article_sort entry of the vinetype.config file.
There are instances, however, where you might wish to "override" an article's template with a different one. Oftentimes designers wish to have a template defined for each top-level section of the website. To accomplish this, Vine Type will load a section template if one is defined in your vinetype.config file.
The format of the variable is: $section_template_sectionname
That is, a dollar-sign followed by section_template_
followed by the name of the section with any slashes included.
The section template will override an article template even when there is only one article defined for a section. If the article is brought up independent of a section, then the article's template file will be used. This applies only to the specific section and not any subsections.
example
$section_template_home:front
$section_template_about_us/maps_and_directions:alternate
$section_template_contact/customer_support:techsupport
Notes:
In the example above, the front template is used when showing the top-level section called home. The alternate template is used when displaying the maps and directions section within the about us section. You must replace spaces in your section names with the underscore character when specifying the section name in your vinetype.config file entry.
In this way, it's easy to create a home page that combines articles from different sections.