Skip to content
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

[TASK] Describe different approaches for handling of content element #750

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 29 additions & 5 deletions Documentation/Configuration/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,6 @@ To use JsonRedirect, define it in the setup.yaml of your extension form's setup:
.. image:: ../Images/Configuration/JsonViewModule.png
:alt: JsonView Module icon with label

|

The JsonView module is an experimental approach for previewing JSON responses of a page in different contexts like pageType, page arguments, usergroup, language, and show/hide hidden content.

Expand All @@ -377,7 +376,6 @@ The JsonView module is an experimental approach for previewing JSON responses of
.. image:: ../Images/Configuration/JsonViewModule-example.png
:alt: Root page for the API endpoint

|

**PageTypeModes**

Expand All @@ -389,7 +387,6 @@ By default, there are 3 settings available:
- *initialData* - standard response from pageType=834
- *detailNews* (commented out) - example of calling the detail action of the news extension for test purposes

|

.. code-block:: yaml

Expand All @@ -416,12 +413,39 @@ By default, there are 3 settings available:
# action: detail
# controller: News
# news: 1

|
..

**Custom YAML Configuration**

You can always create your own YAML configuration and set it in the extension configuration.

.. image:: ../Images/Configuration/JsonViewModule-extconf.png
:alt: Root page for the API endpoint

Content element categories
==========================

Headless default configuration for content element categories in TypoScript `lib.contentElement` is to look in root (`page uid=0`). However depending on your project needs this may not ideal.

(as of TYPO3 v12 you cannot use together `pidInList = root` and `recursive = 99`)

Alternative approach for categories may be to use categories from current rootPage which mitigates this problem.

To begin you need to unset previous `pidInList` value

.. code-block:: text
lib.contentElement.fields.categories.10.select.pidInList >

If you need categories from current rootPage

.. code-block:: text
lib.contentElement.fields.categories.10.select.pidInList >
lib.contentElement.fields.categories.10.select.pidInList.data = leveluid : 0

You can add 'recursive' if categories may be stored under current rootPage

.. code-block:: text
lib.contentElement.fields.categories.10.select.pidInList >
lib.contentElement.fields.categories.10.select.pidInList.data = leveluid : 0
lib.contentElement.fields.categories.10.select.recursive = 99