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

Output of the title of the backend layout instead of the id #707

Open
daUhradone opened this issue Feb 16, 2024 · 4 comments
Open

Output of the title of the backend layout instead of the id #707

daUhradone opened this issue Feb 16, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@daUhradone
Copy link

Describe the bug
In all docs it is descirbed and it would be expected that the name of the backend layout is used for the api, but the id is submitted

To Reproduce
Setup a backend layout and check the api
default is submitted as: -1

Expected behavior
title: string

TYPO3 version and TYPO3 Headless version
TYPO3 12 - headless latest

@daUhradone daUhradone added the bug Something isn't working label Feb 16, 2024
@twoldanski twoldanski added enhancement New feature or request and removed bug Something isn't working labels Feb 21, 2024
@twoldanski
Copy link
Collaborator

Yeah, I confirm this behavior. But it is not ext:headless bug per se, but inconsistent values from core, if you set layout via tsconfig files, you will get nice name (if you set one), but if you add record you will receive ID of record to handle on your side (in fluid context).

@twoldanski
Copy link
Collaborator

@lukaszuznanski we have 2 options to match core behavior or add consistent approach in headless.

@daUhradone
Copy link
Author

Thanks for the reply:
In my sitepackage I loop the title through a locallang-file:
title= LLL:EXT:xzzxpackage/Resources/Private/Language/locallang_be.xlf:backendLayout.2_column.title

That is then no more working in the headless context.

Having the backend layouts in a folder in the page tree, as a record, is probably also not a good place since they should not be changed by any editor and should be clearly out of their reach.

So I assume, best practice is:

a. design the backend layouts in the backend
b. copy the code to your sitepackage (Configuration/BackendLayouts/my-backend-layout.tsconfig) import them inside a Configuration/page.tsconfig file
https://docs.typo3.org/m/typo3/reference-tsconfig/main/en-us/UsingSetting/PageTSconfig.html#setting-page-tsconfig
c. change the title to a unique name for all languages
d. use this title in the Nuxt app
e. if you change the title you have to change it on both sides, TYPO3 and Nuxt

@twoldanski
Copy link
Collaborator

@daUhradone what exactly is not working? Because from what I checked everything is working as expected (we match core behavior), only if you are using backend layouts as records instead of files (files in my opinion are much better solution) you have add extra step (prepare custom Typoscript) to match records to layouts same way you are doing in fluid context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants