Email Marketing Tool

Des44
Participant

Customize private content system pages

SOLVE

When I clone a private content system page in order to customize the page, I immedietly get the following errors even though I have made 0 changes to the cloned file:

 

  1. Error: 0:-1 The source does not contain the required module member_register
  2. Warning: 10:-1 Missing template /membership-base.html

The cloned file is EXACTLY the same as the original, the only difference between the two is the file path. I cannot duplicate the file path, as the original file is a cms default system page. 

How do I address these errors before making my customizations to the cloned file? There is no HubSpot documentation on these errors or customizing private content system pages specifically... Please help!!!
0 Upvotes
1 Accepted solution
evaldas
Solution
Key Advisor | Platinum Partner
Key Advisor | Platinum Partner

Customize private content system pages

SOLVE

Hi @Des44 

 

When you clone a template from the default system template folder, the clone gets "detached" from that folder and placed outside of it. This causes all the references to the other templates become incorrect, as the clone is no longer in the system folder.

 

In order to address this, you can use one of the following options:

 

(1) Clone all the referenced templates as well, placing them all in a similar folder structure

 

(2) Update the references in the cloned file to have the full path to that template (instead of relative path)

 

For example, this piece in your cloned template:

 

{% extends "../membership-base.html" %}

 

would need to become something like this (pointing to the system folder):

 

{% extends "@hubspot/cmsdefaultsystempages/templates/membership-base.html" %}

 

Hope this helps!

 

✔️ Did this post help answer your query? Help the community by marking it as a solution.

View solution in original post

5 Replies 5
evaldas
Solution
Key Advisor | Platinum Partner
Key Advisor | Platinum Partner

Customize private content system pages

SOLVE

Hi @Des44 

 

When you clone a template from the default system template folder, the clone gets "detached" from that folder and placed outside of it. This causes all the references to the other templates become incorrect, as the clone is no longer in the system folder.

 

In order to address this, you can use one of the following options:

 

(1) Clone all the referenced templates as well, placing them all in a similar folder structure

 

(2) Update the references in the cloned file to have the full path to that template (instead of relative path)

 

For example, this piece in your cloned template:

 

{% extends "../membership-base.html" %}

 

would need to become something like this (pointing to the system folder):

 

{% extends "@hubspot/cmsdefaultsystempages/templates/membership-base.html" %}

 

Hope this helps!

 

✔️ Did this post help answer your query? Help the community by marking it as a solution.

Des44
Participant

Customize private content system pages

SOLVE

Yep! That's what did it! Thanks for your reply @evaldas 🙂 

You wouldn't happen to have any insight on editing the header block of the template so I can override the default header partial would you?? 

evaldas
Key Advisor | Platinum Partner
Key Advisor | Platinum Partner

Customize private content system pages

SOLVE

@Des44  sure thing!

 

As you can see, the "membership-base.html" is referencing "partials/membership-header.html" 

 

evaldas_1-1720551133444.png

 

 

In order to customize the header block, you will likely need to clone a couple more templates from the system folder:

  • partials/membership-header.html (where you will make customizations)
  • membership-base.html (where you will point to your customized header)

 

✔️ Did this post help answer your query? Help the community by marking it as a solution.

Des44
Participant

Customize private content system pages

SOLVE

You're the best!! Thank you so much for your time and help!

evaldas
Key Advisor | Platinum Partner
Key Advisor | Platinum Partner

Customize private content system pages

SOLVE

You're welcome! Glad this was helpful 🙂

✔️ Did this post help answer your query? Help the community by marking it as a solution.

0 Upvotes