-
Notifications
You must be signed in to change notification settings - Fork 3
NGSTACK-474 update "Site API Content views" section of the docs #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
NGSTACK-474 update "Site API Content views" section of the docs #43
Conversation
…r Twig templates, extended view config and redirections docs
<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> |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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** |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 | ||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
There was a problem hiding this comment.
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.
Updated "Site API Content views" section of the docs with the following:
content_type
extends
key when wanting to extend the configuration of some Content viewAlso fixed a few typos along the way.