8000 Improved static placeholder documentation (#6315) · django-cms/django-cms@53d59f9 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 53d59f9

Browse files
evildmpczpython
authored andcommitted
Improved static placeholder documentation (#6315)
[ci only docs]
1 parent 94fbf0b commit 53d59f9

File tree

5 files changed

+23
-11
lines changed

5 files changed

+23
-11
lines changed
Loading

docs/introduction/templates_placeholders.rst

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ If you switch to *Structure* mode, you'll see the new placeholders available for
6767

6868
.. image:: /introduction/images/new-placeholder.png
6969
:alt: the new 'splashbox' placeholder
70-
:width: 600
7170
:align: center
7271

7372

@@ -98,8 +97,19 @@ single page, we should add it to our base template
9897
{% static_placeholder 'footer' %}
9998
</footer>
10099

101-
Save the template and return to your browser. Refresh any page in ``Structure`` mode, and you'll
102-
see the new static placeholder. If you add some content to it in the usual way, you'll see that it
100+
Save the template and return to your browser. Refresh any page in Structure mode, and you'll
101+
see the new static placeholder.
102+
103+
.. image:: /introduction/images/static-placeholder.png
104+
:alt: a static placeholder
105+
:align: center
106+
107+
.. note::
108+
109+
To reduce clutter in the interface, the plugins in static placeholders are hidden by default.
110+
Click or tap on the name of the static placeholder to reveal/hide them.
111+
112+
If you add some content to the new static placeholder in the usual way, you'll see that it
103113
appears on your site's other pages too.
104114

105115

docs/reference/images/placeholder.png

26.6 KB
Loading
22 KB
Loading

docs/reference/templatetags.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ Placeholders
2424
placeholder
2525
-----------
2626

27-
.. versionchanged:: 2.1
28-
29-
The placeholder name became case sensitive.
30-
3127
The ``placeholder`` template tag defines a placeholder on a page. All
3228
placeholders in a template will be auto-detected and can be filled with
3329
plugins when editing a page that is using said template. When rendering, the
@@ -37,6 +33,10 @@ Example::
3733

3834
{% placeholder "content" %}
3935

36+
.. image:: /reference/images/placeholder.png
37+
:alt: a placeholder named 'content'
38+
:align: center
39+
4040
If you want additional content to be displayed in case the placeholder is
4141
empty, use the ``or`` argument and an additional ``{% endplaceholder %}``
4242
closing tag. Everything between ``{% placeholder "..." or %}`` and ``{%
@@ -81,8 +81,6 @@ context variables and change some other placeholder behaviour.
8181
static_placeholder
8282
------------------
8383

84-
.. versionadded:: 3.0
85-
8684
The ``{% static_placeholder %}`` template tag can be used anywhere in a template element after
8785
the ``{% cms_toolbar %}`` tag. A static placeholder instance is not bound to any particular page
8886
or model - in other words, everywhere it appears, a static placeholder will hold exactly the same
@@ -101,10 +99,14 @@ Example::
10199

102100
{% static_placeholder "footer" %}
103101

102+
.. image:: /reference/images/static-placeholder.png
103+
:alt: a static placeholder
104+
:align: center
104105

105-
.. warning::
106+
.. note::
106107

107-
Static placeholders are not included in the undo/redo and page history pages
108+
To reduce clutter in the interface, the plugins in static placeholders are hidden by default.
109+
Click or tap on the name of the static placeholder to reveal/hide them.
108110

109111
If you want additional content to be displayed in case the static placeholder is
110112
empty, use the ``or`` argument and an additional ``{% endstatic_placeholder %}``

0 commit comments

Comments
 (0)
0