Guide templating renders the Help Center theme packages. This contains the Curlybars templating language that is used in the template files, CSS and JS files, and the manifest file.
Guide templating is also known as the Templating API.
About Guide templating versions
Templating API V2 was released on February 24, 2020, and this version applies to the Copenhagen theme and any new theme releases.
If you have customized your theme, you can continue to use Templating API V1 and do not need to upgrade to V2 unless you want to take advantage of new features and improved performance. You can check which version of the framework you're using in Guide (see Checking your templating version).
With V2, you can no longer use jQuery statements anywhere in a theme where you could
document_head.hbs). If you want to use jQuery with V2 you'll
need to import the jQuery library.
We've also deprecated some helpers and changed some helpers to output data objects instead of HTML. You can find a full list here.
Checking your templating version
You can see the templating version from the Edit code view in your theme or in the manifest file.
To check the templating version
- In Guide, click the Customize design icon () in the sidebar.
- Click Customize on the theme you want to see.
- Click Edit code.
- Under the theme name, you'll see the templating version number, for example,
Templating API v2.
This version number corresponds to the
api_versionfield in the manifest file.
Upgrading from Guide templating version 1 to version 2
If you have customized your Guide theme, you can upgrade to version 2 to take advantage of new features and improved performance.
To upgrade the templating version
- Download your Help Center theme (see Downloading a Help Center theme).
- Open the theme package locally and edit the manifest.json file.
- In the manifest.json file, find the
api_versionfield and change the value to 2.
- Preview your theme changes locally. When you preview the theme, you'll get warnings if you are using helpers that have been deprecated in version 2.
- If you are using a deprecated helper, use this information to replace the helper with
a supported equivalent.
Preview your theme again to verify that there are no further warnings.
- Upload the updated theme to Guide (see importing your Help Center
You can check that the new version has been applied by checking your templating version.