djangocms-blog: How Does the Meta Block in Base Template Work?

Description

I am confused by purpose of the meta block in base.html template code.

Steps to reproduce

  1. Confirm working djangocms-meta setup:
    1. Have working djangocms-blog install.
    2. Have custom djangocms-blog app templates, that still has this code in base.html:
      {% block meta %}
          {%  if meta %}
              {% include "meta/meta.html" %}
          {% endif %}
      {% endblock meta %}
      
    3. Have working configuration for djangocms-meta app. This includes this code in base.html CMS template:
      <head …>
          …
         {% include "meta/meta.html" %}
          …
      </head>
      
  2. Try to break working djangocms-meta setup:
    • Remove the {% block meta %} block of code from base.html app template (not the CMS template).
  3. Try, with more force, to break working djangocms-meta setup:
    • Remove the {% include "meta…" %} line of code from base.html CMS template (not the app template).

Expected result

  1. πŸ’‘ The code renders something somewhere.
  2. πŸ’‘ Removal of the code does not render something somewhere.
  3. πŸ’‘ Removal of the code does not render something somewhere.

Actual result

  1. βœ“ The code renders <meta> tags in the <head>.
  2. πŸ€·β€β™‚οΈ Removal of the code seems to render everything the same (as in step 1) everywhere.
  3. βœ“ Removal of the code does not render <meta> tags in the <head>.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (16 by maintainers)

Most upvoted comments

awesome!

i updated #630 to fix the base template

Thanks a lot for your patience and your super detailed reports!