Hey @lucybrayOdevo,
if you have cloned the template to your (child) theme, you need to change the {% extends “../system-base.html” %} to the file which contains your layout.
Most times it’s called base.html or something. Just look at your other templates which should have an {% extends %} tag and modify the path in the pref-center template accordingly.
Example file/folder structure:
- theme
- css
- modules
- templates
- layouts
- system
- custom_preference-center.html ← your cloned template
- preference-center.html ← default/old one
- fields.json
- theme.json
In this case the extends tag should look like this
{% extends "../layouts/base.html" %}
or
{% extends "./templates/layouts/base.html" %}
In case you don’t want to use the extends tag, you need to copy the whole content of the base.html into your custom template and put the required pref-center content (subscription module) into it.
Important note: The reason why HubSpot tells you that the extends tag is missing is because of the {{ standard_header_includes }} and {{ standard_footer_includes }} which are required in every template. Therefore the easiest way to accomplish this is to extend the base and call it a day 
About the missing module - there are two options I can think of.
- The extends tag overrides everything and HS mistakenly fires this error
- You might have not closed the module_block somewhere
The default module_block is located in @hubspot/cmsdefaultpages/templates/system/email-subscription-preferences.html and looks like this:
{% module_block module "email_subscription_preferences"
path="@hubspot/email_subscriptions",
extra_classes="form-wrapper form-wrapper--subscription-preferences",
email_heading_level="p",
language_dropdown_label={{ template_translations.subscription_preferences_language_input_label.message }},
resubscribe_button_text={{ template_translations.subscription_preferences_resubscribe_button_text.message }},
subheader_text="",
unsubscribe_all_unsubbed_text={{ template_translations.subscription_preferences_resubscribe_text.message }},
button_text={{ template_translations.subscription_preferences_button_text.message }},
header="",
unsubscribe_all_option={{ template_translations.subscription_preferences_unsub_all_option.message }},
unsubscribe_all_text=""
%}
{% module_attribute "unsubscribe_single_text" %}
{% if business_unit().name %}
{{ template_translations.subscription_preferences_single_text_business_unit.message }}
{% else %}
{{ template_translations.subscription_preferences_single_text.message }}
{% endif %}
{% end_module_attribute %}
{% end_module_block %}
Unless you’re working with business units or translations, you can reduce this code drastically to something like this:
{% module "email_subscription_preferences" path="@hubspot/email_subscriptions" %}
^ this is the bare minimum of this module
If you’re working with multi-languages/translations, I’d follow the example setup of the cmsdefaultpages setup and do something like
{% module "email_subscription_preferences"
path="@hubspot/email_subscriptions"
language_dropdown_label={{ template_translations.subscription_preferences_language_input_label.message }},
resubscribe_button_text={{ template_translations.subscription_preferences_resubscribe_button_text.message }},
subheader_text="",
unsubscribe_all_unsubbed_text={{ template_translations.subscription_preferences_resubscribe_text.message }},
button_text={{ template_translations.subscription_preferences_button_text.message }},
header="",
unsubscribe_all_option={{ template_translations.subscription_preferences_unsub_all_option.message }},
unsubscribe_all_text="" %}
The corresponding language setting can be found in the system-base.html file
{% set template_translations = load_translations("./_locales", html_lang, "en") %}
It’s loading the corresponding translation JSONs from the _locales folder in the cmsdefaultpages folder structure.
Hope this helps
best,
Anton