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

Add stdWrap function to createDemandFromSettings. #256

Closed
wants to merge 1 commit into from

Conversation

MarkusGehrig
Copy link

When using the content element "Insert Records" to show tt_address records there is a need to send the selected addresses to the controller.

As in TYPO3, the stdWrap functions are not enabled at the extension settings you have to use the TypoScriptService as it's done in tx_news.

With this merge request you can now use following typoscript to define how Insert Record will handle tt_address records

tt_content.shortcut.20.tables := addToList(tt_address)
tt_content.shortcut.20.conf.tt_address = USER
tt_content.shortcut.20.conf.tt_address {
    userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
    extensionName = TtAddress
    pluginName = ListView
    vendorName = FriendsOfTYPO3
    controller = Address
    action = list
    switchableControllerActions {
        Address {
            1 = list
        }
    }
    settings =< plugin.tt_address.settings
    settings {
        insertRecord = 1
        useStdWrap = singleRecords
        displayMode = single
        singleRecords.field = uid
    }
}
# For fluid_styled_content
tt_content.shortcut.variables.shortcuts.tables := addToList(tt_address)
tt_content.shortcut.variables.shortcuts.conf.tt_address < tt_content.shortcut.20.conf.tt_address

This allows to use TypoScript Variables and Function as singleRecords.field = uid when calling the plugin from typoscript. This is needed when using the content element insert records to show tt_address records.
@georgringer
Copy link
Contributor

Wanna add Tests as well?

@MarkusGehrig
Copy link
Author

As I'm have no plan how to implement these tests. I didn't think that's a good idea.

@georgringer
Copy link
Contributor

not needed, rejecting

@georgringer georgringer closed this May 1, 2024
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

Successfully merging this pull request may close these issues.

2 participants