From 4bb8a28c4de8b43f88733554919e306bfc7ec784 Mon Sep 17 00:00:00 2001 From: Richard Cooke Date: Wed, 12 Jun 2024 15:59:01 -0400 Subject: [PATCH] Update 02-templates_placeholders.rst In a fresh install of 4.1.1 and the start project, I discovered the static aliases placeholder only works inside the content block. I had changed my base.html to use the 3 blocks suggested, so I had to edit that to this before the static aliases showed up: {% block content %} {% placeholder "feature" %} {% placeholder "content" %} {% placeholder "splashbox" %} {% endblock content %} --- docs/introduction/02-templates_placeholders.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/introduction/02-templates_placeholders.rst b/docs/introduction/02-templates_placeholders.rst index 53ddb1d8417..d5cfad78b6e 100644 --- a/docs/introduction/02-templates_placeholders.rst +++ b/docs/introduction/02-templates_placeholders.rst @@ -89,16 +89,18 @@ Do not forget to add ``djangocms_alias`` to your ``INSTALLED_APPS`` in ``setting Static aliases are an easy way to display the same content on multiple locations on your website. Static placeholders act almost like normal placeholders, except for the fact that once a static placeholder is created and you added content to it, it will be saved globally. Even when you remove the static placeholders from a template, you can reuse them later. -So let's add a footer to all our pages. Since we want our footer on every single page, we should add it to our **base template** (``mysite/templates/base.html``). Place it near the end of the HTML ```` element: +So let's add a footer to all our pages. Since we want our footer on every single page, we should add it to our **base template** (``mysite/templates/base.html``). Place it near the end of the HTML ```` element, and inside a content block: .. code-block:: html+django :emphasize-lines: 1,3-5 {% load djangocms_alias_tags %} - + {% block content %} + + {% endblock content %} {% render_block "js" %}