Skip to content

Commit

Permalink
[DOCS] Document behavior of hidden relations in backend context
Browse files Browse the repository at this point in the history
Fixes: #174
  • Loading branch information
nhovratov committed Mar 30, 2024
1 parent df67730 commit 3ec6cdb
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions Documentation/Definition/Source/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,24 @@ considered. Therefore, it is advised to provide an own preview for custom
Content Elements. Previews for **Page Types** are displayed at the top of the
content area and beneath the page title.

.. note::

In backend context, all hidden relations like Collections or file references
are displayed by default. Thus, the integrator should style those hidden
elements accordingly or simply not render them.

.. code-block:: html

<!-- Hidden relations like Collections -->
<f:for each="{data.relations}" as="item">
<f:if condition="{item._raw.hidden}"><!-- Style or hide --></f:if>
</f:for>

<!-- Hidden file references -->
<f:for each="{data.images}" as="file">
<f:if condition="{file.properties.hidden}"><!-- Style or hide --></f:if>
</f:for>

See also:

* Learn more about :ref:`templating <cb_templating>`.
Expand Down

0 comments on commit 3ec6cdb

Please sign in to comment.