How Does the Meta Block in Base Template Work?
See original GitHub issueDescription
I am confused by purpose of the meta
block in base.html
template code.
Steps to reproduce
- Confirm working
djangocms-meta
setup:- Have working
djangocms-blog
install. - Have custom
djangocms-blog
app templates, that still has this code inbase.html
:{% block meta %} {% if meta %} {% include "meta/meta.html" %} {% endif %} {% endblock meta %}
- Have working configuration for
djangocms-meta
app. This includes this code inbase.html
CMS template:<head …> … {% include "meta/meta.html" %} … </head>
- Have working
- Try to break working
djangocms-meta
setup:- Remove the
{% block meta %}
block of code frombase.html
app template (not the CMS template).
- Remove the
- Try, with more force, to break working
djangocms-meta
setup:- Remove the
{% include "meta…" %}
line of code frombase.html
CMS template (not the app template).
- Remove the
Expected result
- 💡 The code renders something somewhere.
- 💡 Removal of the code does not render something somewhere.
- 💡 Removal of the code does not render something somewhere.
Actual result
- ✓ The code renders
<meta>
tags in the<head>
. - 🤷♂️ Removal of the code seems to render everything the same (as in step 1) everywhere.
- ✓ Removal of the code does not render
<meta>
tags in the<head>
.
Issue Analytics
- State:
- Created 3 years ago
- Comments:16 (16 by maintainers)
Top Results From Across the Web
Base Templates and Blocks - Hugo
The block keyword allows you to define the outer shell of your pages' one or more master template(s) and then fill in or...
Read more >how can I use multiple {% block content %} inside base ...
That is, a block tag doesn't just provide a hole to fill – it also defines the content that fills the hole in...
Read more >Django Block Content - Vegibit
The block tag is used to define a block that can be overridden by child templates. In other words, when you define a...
Read more >Template Inheritance — Flask Documentation (2.2.x)
Template inheritance allows you to build a base “skeleton” template that contains all the common elements of your site and defines blocks that...
Read more >extends - The flexible, fast, and secure PHP template engine
You can't define multiple block tags with the same name in the same template. This limitation exists because a block tag works in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
awesome!
i updated #630 to fix the base template
Thanks a lot for your patience and your super detailed reports!
@tacc-wbomar thanks again. Closing this via merge of #630