Switching Templates

Advanced Topic
If you have already created a page with one template and determined that a different template would be a better fit for the content you are working with, you can assign a new template to an existing page. Most, if not all, of the content created in the Rows and Columns areas will be transferred to the new template.

This article pertains to NMSU templates v4.1. The same process can be followed for sites that use legacy templates but there is no guarantee that content will be transferred as described below.

On this page:


 What types of content will be transferred if I switch templates?

Cascade templates are built by utilizing snippets of code known as Data Definitions that are maintained centrally. Depending on the template you used to start with and which you select to change to, some content may or may not be transferred.

switching-templates.png

 Instructions

Switching Templates Using Content Types

  1. Click Edit to open the page editor window.

  2. On the Configure tab, click on the button with the template name under Content Type.

    Screen Shot 2024-02-08 at 1.22.38 PM.png
  3. From the Choose a content type menu, click Browse then select the new template you’d like to use and click Choose.

 

  1. Click the Content tab to confirm the content was transferred as you expected.

  2. Click Preview Draft and then Submit to save your changes to Cascade.

You will more than likely see either an error message, a section of the page with a bunch of text above the content area, or your page content with a missing masthead, navigation or footer. This is to be expected.

Please note that you must re-link the paths to the following regions:

  • Site Navigation

  • Masthead (Headers)

  • Footer

  • Search Pop-Down

  • Mobile Elements

In addition, banner images and page headings require a “calling-block” which might also need to be re-linked depending on the template you have selected.

Identifying Region Paths

  1. Click Edit to open the page editor window.

  2. Click the Configure tab.

  3. Scroll down the page until the Regions section. Regions are listed in alphabetical order. Each region will include a label, a block and a format. Most regions will have the appropriate paths linked appropriately, however you will need to re-link the paths for at least 5 regions.


 Region Path Overview

The Footer
  • The only required path for the footer is the format.

  • There are 4 different footer styles to choose from, although it is suggested that you select the same footer format as the rest of your pages in your site.

  • Footer formats are located in the _source site > formats folder > Mastheads & Footers folder.

The Masthead
  • The only required path for the masthead is the format.

  • There are 2 different masthead styles to choose from, although it is suggested that you select the same masthead format as the rest of your pages in your site.

  • Masthead formats are located in the _source site > formats folder > Mastheads & Footers folder.

Mobile Elements
  • The only required path for mobile elements is the format.

  • There is only one mobile-element format.

  • Masthead formats are located in the _source site > formats folder

Search Pop-Down
  • The only required path for the search pop-down is the format.

  • There is only one search-input format.

  • Search Pop-down format is located in the _source site > formats folder > Search Options folder.

The Site Navigation
  • There are two required paths for the navigation: a block and format.

  • The Navigation block is located in your site.

  • The navigation builder format is part of the centrally managed format library.

    • Navigation format is located in the _source site > formats folder > Block Helpers folder.


Relinking Region Paths

  1. Click Edit to open the page editor window.

  2. Click the Configure tab.

  3. Scroll down the page until the Regions section and locate the label you need to relink.

  4. Click on the <>Choose Format button.

  5. The Choose a format window opens, click the Browse. In the site dropdown, locate the “_source” Cascade site and select it.

     

  6. Using the paths provided in the region path overview above, locate the file you need to replace.

  7. Click Choose.

  8. Follow the same steps to relink the missing masthead, footer, mobile-elements and serch pop-down formats.

  9. Click Preview Draft and then Submit to save your changes to Cascade.


Relinking Region Paths: The Navigation

  1. Click Edit to open the page editor window.

  2. Click the Configure tab.

  3. Scroll down the page until the Regions section and locate the Site Navigation label.

  4. Click on the <>Choose Format button.

  5. Following the same steps above, locate the “navigation-builder” format and click Choose.

  6. Click on the Choose Block button.

  7. Click on Browse and locate the _Navigation Builder block in your site, click Choose.

  8. Click Preview Draft and then Submit to save your changes to Cascade.


 Troubleshooting Error Messages

After you have selected a new template and click Preview Draft, you may see an Error message that includes the following text: “An error occurred: Could not transform with format…”

This means that you need to re-link a “calling block” path on the Configure tab of the page editor.

 Instructions

Fixing Calling Block Paths

  1. Identify the format that you need to fix by looking at the error message. In the path provided in between the quotation marks, the region label and format name are identified. In the example below, the calling block is missing from the “hero” region with the format “program-hero”

     

  2. Click Edit to open the page editor window.

  3. Click the Configure tab.

  4. Scroll down the page until the Regions section and locate the label you identified in step 1.

  5. Click the Choose Block button.

  6. In the Choose a block window, select Browse.

  7. Click on the _assets folder, then the _cascade folder, then the blocks folder and select the index folder.

  8. Select the calling-page block and click Choose.

  9. Click Preview Draft and then Submit to save your changes to Cascade.


 Related articles