Skip to content

Conversation

AntePrkacin
Copy link

@AntePrkacin AntePrkacin commented Oct 2, 2025

Updated "Site API Content views" section of the docs with the following:

  • added paragraph about using placeholders (wildcards) for Twig templates - added a note that they are only available for content_type
  • added paragraph about using extends key when wanting to extend the configuration of some Content view
  • moved the "Redirections" section under the "Site API Content views" section

Also fixed a few typos along the way.

…r Twig templates, extended view config and redirections docs
@AntePrkacin AntePrkacin requested a review from pspanja October 2, 2025 12:38
@AntePrkacin AntePrkacin self-assigned this Oct 2, 2025
<h1>Content ID: {{ content.innerContent.id }}</h1>
<h2>Location ID: {{ location.innerLocation.id }}</h2>
<h3>Field ID: {{ field.innerField.id }}</h3>
<h4>Inner Content Info: {{ contentInfo.innerContentInfo }}</h4>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are objects, there should be an example with the property that can be rendered this way.

This template is used for fallback from Site API to Ibexa CMS views. In the following example
it's used to configure fallback for ``line`` view of ``article`` ContentType:
Extending configuration from some Content view
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...from an existing Content view*

It is possible to configure a Content view to **extend** the configuration of another Content view.
Let's say that you have defined two views that both render a list of items. In one view,
you want to render them without intro, and in the other one, you want to render them with intro.
In order to not need the same configuration twice, you can set that one Content view **extends**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

...In order to do define basically the same configuration twice...*

...you can extend existing view Configuration from another one - using...

params:
with_intro: true
This enables you to define the configuration only once and have it be extended to
Copy link
Member

@pspanja pspanja Oct 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This enables defining the configuration once and extending it in multiple other Content views, overriding the parameters sent (key params) to the Twig template*

This template is used for fallback from Site API to Ibexa CMS views. In the following example
it's used to configure fallback for ``line`` view of ``article`` ContentType:
Extending configuration from some Content view
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be one level bigger, so it shows up in the left side navigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants