For the home.html, you want to extend with the base.html, but you wouldn’t add your home.html content/sections to the base.html. This would prevent you from creating unique templates for different page types as they would all then contain the home.html sections.
Hi @Jnix284 , Thank you ! I get your point !
So in this case I do extend the base within the home.html(as you can see in the code) what’s missing exactly here ?
Thank you
I see that you’ve extended the base in the home.html and that looks correct - based on the initial question (wanting to add the home.html to the base) and my response (not adding it), can you clarify what you mean by what’s missing?
Is something still not working as expected?
The home.html should reference the base.html and the template should have all of the included elements from the base.html - is this not the case?
what I have displayed on my page are just the footer and header (coming from base.html)
But the two sections I am calling here in home.html are not being called properly apparently. Because they are not being displayed.
@AzharBondi ah, ok, thank you! I thought you were trying to insert the home.html into the base.html.
The first thing I’d check is your directory path, based on the screenshot in your original post, you have three folders within the “Practicum” theme - Modules, Section Template, and Templates.
One other suggestion, depending on how far you are with coding everything, would be to name your folders using lowercase and if you can’t use a single word like “sections” than use dashes instead of spaces “section-template” - I haven’t tested whether your “Section Template” with the space could be causing the issue, but it goes against the best practices I was taught.
Let me know if you can get it working with these changes
@AzharBondi I just realized you’re also missing a bit of code for the include statement.
Here’s the updated code with the context added:
{% dnd_area 'dnd_area' label= 'Main Content' %}
{# Image and Text section #}
{% include_dnd_partial path= '../Section Template/two-columns-section.html' context={} %}
{# End Image and Text section #}
{# Team members section #}
{% include_dnd_partial path= "../Section Template/team-module-section.html" context={} %}
{# End Team members section #}
{% end_dnd_area %}
Hello community,
i came across this because i faced the same issue and this thread motivated me to test some behaviours.
I have been working on a landing page template. The template was already selected, and I was in developerMode to regularly reset the content. To outsource section templates, I then used the include tag
include_dnd_partial
The section was not displayed, but rather a broken module without a label. Resetting the content did not change this.
I then tried to view my landingpage template using thepreview in the design-tools. There, all sections were displayed. What actually helped me:
I deleted my landingpage and recreated it with my template. Everything is now displayed correctly.
Resetting the contents in developerMode also works without any problems.
I use the include_dnd_partial tag without a context attribute, as this seems to be undocumented. I also use double quotes, as was shown in the documentation as an example.
{# Form #}
{% include_dnd_partial path="../sections/landingpage-pullup-form.html" %}
Hey again @Jnix284 , still no changes maybe I need to delete the landing page and recreate it like @JanRa suggested ! If it works I will let you guys know ! Thank you for all the help provided