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

Listelement Items empty #8

Closed
kimchristiansen opened this issue Aug 18, 2021 · 2 comments
Closed

Listelement Items empty #8

kimchristiansen opened this issue Aug 18, 2021 · 2 comments

Comments

@kimchristiansen
Copy link

kimchristiansen commented Aug 18, 2021

I wanted to test this promising extension. I installed and configured the extension via composer as described in the instructions and created a content element.

Now I can create listelements, but not edit them. Not even the title field is editable.

Did I miss something?

Setup:
TYPO3 10.4.17
PHP 7.3.x
list elements 0.2.1

Further extensions:
container
content_defender

listelements-empty

Thanks in advance!

@davidsteeb
Copy link
Contributor

Yes, we are still in the process of finishing up work here, and the documentation is lacking.

Here's what I suppose is missing: You need to add a showitem configuration to your element for the list items. This might look like this:

$GLOBALS['TCA']['tt_content']['types']['<yourelement>']['columnsOverrides'] = [
    // configuration for this element's tt_content field configuration
    'header' => [
        'description' => 'Description for the header field of the tt_content element',
    ],
    'tx_listelements_list' => [
        'label' => 'My List Item Label',
        'config' => [
            'appearance' => [
                'newRecordLinkTitle' => 'Add a new item to my list',
            ],
            'overrideChildTca' => [
                // add a showitem configuration for the list items for this CType
                'types' => [
                    '0' => [
                        'showitem' => '
                                header,
                                text,
                                --palette--;;hiddenpalette', // always include the hidden palette (languages)
                    ],
                ],
                'columns' => [
                    // change configuration for fields for list items here (for this CType's list items)
                    'text' => [
                        'config' => [
                            'rows' => 5,
                        ],
                    ],
                ],
            ],
        ],
    ],
];

You can change the fields for list items for each CType you create.

@kimchristiansen
Copy link
Author

Thank you very much for the quick answer. That was the missing piece of information. Keep up the good work!

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

No branches or pull requests

2 participants