Standard partial "Missing template" error

Hey! I am trying to add a standard partial to a template and I get an unexpected error…

<!-- Missing Template at Path: 'path="./partials/entete.html"' -->

Starting from the cms-boilerplate from GitHub, here is my code :

src/templates/layouts/base.html

{% block header %}
 {% global_partial
 path="../partials/header_global.html" %}
{% endblock header %}

src/templates/landing-page.html

{% extends "./layouts/base.html" %}

{% block header %}

 {% include
 path="./partials/header.html" %}

{% endblock header %}

I think he path is right, since using `{% global_partial path=“./partials/header_global.html” %}` works, and both `header.html` and `header_global.html` are in the same folder (`./partials/`).

src/templates/partials/header.html

<!--
 templateType: page
 isAvailableForNewContent: false
-->

<header class="header sticky-nav">
 {# The link below is used for a navigation skipper which allows users navigating the site with their keyboard to skip over the site navigation. More information on the navigation skipper can be found here: https://github.com/HubSpot/cms-theme-boilerplate/wiki/Accessibility #}

 <a href="#main-content" class="header__skip">Skip to content</a>

 {# Main header #}

 <div class="header__container content-wrapper">
 {# Header logo column #}

 <div class="header__logo header__logo--main">
 {% module "site_logo"
 path="@hubspot/logo",
 img={
 "loading": "eager"
 },
 extra_classes="no-show--max680" %}

 {% module "site_logo_mobile"
 path="@hubspot/logo",
 img={
 "loading": "eager"
 },
 extra_classes="no-show--min680" %}
 </div>

 {% module "button"
 path="../../modules/button",
 text="Click button" %}
 </div>
</header>

src/templates/partials/header.html

<!--
 templateType: global_partial
 label: Global Header
-->

<!-- same as header.html -->

The global partial (header_global.html) is working, but the standard partial (header.html) is not! How is this possible?

According to the docs it should be allright as-is : HTML + HubL Templates - HubSpot docs

I don’t want my header to be global because the button is an anchor to the form on the bottom of the page, so it is page related (aka NOT global).

I have tried many things :

  • using “include_dnd_partial” instead of “include”
  • moving the “include” statement inside “{% block body %}”
  • creating a partial `./partials/simple.html` with only a `<p>` tag and import it in multiple ways
  • many other things trial and errors…

Nothing is working for standard partials, only the global partial…

What am I missing?

Thanks!

Hi, @lolcabanon :waving_hand: Thanks for your question! I’d like to invite some of our community members to the conversation – hey @Anton @piersg, can you share any tips with @lolcabanon? Or insights if you would tackle this a different way?

Best,

Jaycee

Thanks @Jaycee_Lewis for the follow up!

For the moment, I solved my problem by pasting the `header.html` code directly inside the `landing-page-1.html` file, but I’d like a solution to make it easily reusable in templates.

Hey! Any updates on this ?

Just try removing “path=”
It will end up looking like this

{% include “../test/test.html” %}

Wow I’m almost sad that it worked! ^^ Thanks a lot!!!