Customize private content system pages

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!!!

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!

Yep! That’s what did it! Thanks for your reply @evaldas :slightly_smiling_face:
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??

@Des44 sure thing!

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

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)

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

You’re welcome! Glad this was helpful :slightly_smiling_face: