Template Types

There are many different types of templates in BranchCMS that can be used to manage the design and code of your website.

They include:

  • Site templates
  • Snippets
  • Navigation templates
  • App templates
  • Form templates
  • Page content templates
  • Content builder element templates
  • Widget templates
  • Email campaign templates

There are also other mini-templates for things like breadcrumb trails or page titles.

Just about everything has a template so that you have full control over how your content is displayed and what HTML code you use.

Below is an overview of each template type.

Site templates

Site templates are the outermost layer of templates in your design. They provide the overall structure of the website. Within the template code, you could include snippets, navigation templates and content blocks (and other components like containers or APIs but we'll keep this basic).

Snippets

Snippets are reusable pieces of code that you can use in your site templates to avoid duplicating code. For example, it's common to have a snippet that holds the common HTML for the head section of the site and another for the footer section of a site. You would place the tag for the snippet within your template code. When used within templates snippets help to provide the overall structure of the website.

Note, snippets are not required. If you only have one template for your site, then snippets are overkill, and you should simply have your code in the template.

Navigation Templates

Navigation templates are micro templates specific for building the HTML for a navigation menu. They are used when a navigation menu tag is included in a template, snippet or another type of template.

App Templates

Within apps like the blog or gallery, you would use app templates to build the HTML for displaying the different app pages. The actual content is managed through the app item (i.e. blog post, gallery item, store category) and the app template takes the content and displays it with your code.

Form Templates

Forms have their own templates to handle the HTML code to display them. A form API tag can be placed in any type of content or template.

Page Content Templates

Page content templates are used within Content Layouts to provide structure for editing content for a page. You can create different field types for entering templates, and then the content template is used to build the HTML for the content. They give you granular control over how content is built and displayed on a page.

Content Builder Element Templates

Content builder elements are used as pre-built structures of content that can be used to build out the content for a page. They are a similar idea to page content templates except they are for individual pieces of content within a content block instead of providing structure for the whole content block. Each content builder element has it's own template to build the HTML to display the content.

Widget Templates

Collection Widgets and Feed Reader widgets all have their own templates to output their content. You can create multiple templates in case you want to display the same widget in different ways throughout the website.

Email Campaign Templates

Email campaign templates are used to provide the structure for each email sent from the Campaigns app.