TYPO3-CMS/styleguide

Need Scenario with "create new" **and** "create relation"

DavidBruchmann opened this issue · 1 comments

Feature Request

Is your feature request related to a problem? Please describe.
With currently known settings I can create this button and selector:

image

Without the selector the button lets me create a new content element.
When--by settings-- the selector is shown, the button creates a relation to the record that is currently visible in the selector.

I need an example where I can create a new record as well as a connection to an existing record.

Describe the solution you'd like
An example where the button is to create a new record and the selector to create a relation.

Describe alternatives you've considered
A cumbersome alternative would be an individual implementation. I hope though that I just missed the correct settings to achieve my target and that my desired solution is possible by settings in the TCA only.

Additional context
It's related to this config where the table tx_wdbnewssnapin_news_ttcontent_mm is just an intermediate table (with further properties) but not a classical mm-table which would be very limited:


        'config'  => [
            'type'                => 'inline',
            'foreign_table'       => 'tx_wdbnewssnapin_news_ttcontent_mm',
            'foreign_field'       => 'uid_news',
            'foreign_sortby'      => 'sorting_ttcontent', // sorting_news
            'foreign_label'       => 'uid_ttcontent',
            'foreign_selector'    => 'uid_ttcontent',
            'foreign_unique'      => 'uid_ttcontent',
            'maxitems'            => 9999,
            'appearance'       => [
                'collapseAll'     => true,
                'expandSingle'    => true,
                'newRecordLinkAddTitle' => false,
                'levelLinksPosition' => 'top', // [top | bottom | both]
                'useCombination'  => true,
                'useSortable'     => true,
                'showNewRecordLink' => true,
                'showPossibleRecordsSelector' => true,
                'showSynchronizationLink' => true,
                'showAllLocalizationLink' => true,
                'showPossibleLocalizationRecords' => true,
                'enabledControls' => [
                    'info'           => true,
                    'new'            => true,
                    'dragdrop'       => true,
                    'sort'           => true,
                    'hide'           => true,
                    'delete'         => true,
                    'localize'       => true,
                ],
            ],
            'behaviour' => [
                'allowLanguageSynchronization' => true,
            ],
        ],

Further details can be seen here: https://github.com/DavidBruchmann/wdb_news_snapin, the config above is in the table tx_news_domain_model_news.

This issue is populated with clearer wording by #331, especially as the desired result should exist already if working like expected.