CMS Default System Templates

Hi Guys,

I am here to get help in the following scenario.

I want to customize the membership access denied template in HubSpot.

Please consider the attached screenshot and suggest the best possible solution:

  • Why am I not able to clone the cmsdefaultsystempages theme?
  • Could you tell me how to customize the system page templates?
  • How I can change the value of template_translations variables used in templates (e.g. template_translations.member_access_denied_heading.message)

Please suggest to me the best possible solution to correct my understanding.

Thanks in advance.

Hi @hafizusama,

  • you can’t clone the cmsdefaultsystempages theme, because it’s not a theme. The folder is build like a theme but it isn’t. The cmsdefaultsystempages folder should be seen as a summary of templates and files that are beeing cloned to your specific theme if it doesn’t have those themes/files…
  • Customizing the system page templates can be done only in the design manager since there’s currently no visual editor like in emails/web-/landing pages to modify them. Could you please specify what you’d like to customize?
  • In order to change the change the translation you have to:
    • Look in the templates/_locales/LANGUAGE/messages.json(every language/tranlation has it’s own folder) file
    • Apply your changes in this file and save it
    • If you’re don’t want to have translations, you can either replace the {{ template_translations.member_access_denied_heading.message }} with some plain text, or create your own variables file and put the texts like this(see below) in it

Example of a custom variables file:

{% set error_headline = "Ooops!" %}
{% set error_message = "something went wrong. Help is on it's way" %}

Once you’ve created this file, you can load it into the template like

{% set template_css = "../css/templates/error.css" %}
{% set font_config = {
 "Source Serif Pro": ["600"],
 "Montserrat": ["300", "400", "500", "700"]
} %} 
{# if you're implementing the template into your theme, you might want to get rid of this font and CSS info above. #}

{% extends "../membership-base.html" %} {# if you're implementing the template into your theme, you need to either copy the membership-base template to your theme or change it to your base layout file(you'll most likely will need to do some further adjustments) #}

{% include 'PATH-TO-FILE.html' %}
...

<h1>{{ error_headline }}</h1>
<p>{{ error_message }}</p>

best,

Anton

Thank you so much, @Anton for explaining the structure of the cmsdefaultsystempages folder. It helped a lot.