[TYPO3-mvc] Pass dynamic parameters to extbase plugin by typoscript

Stefan Terborg terborg at simplethings.de
Mon Oct 10 17:55:31 CEST 2011


Hi,

I insert an extbase plugin within the TypoScript of my page. How can I pass dynamic parameters to the plugin?

Or maybe I have to choose an other approach: My goal is to parse a custom tag from bodytext (not necessarily RTE). The tag contains custom attributes (uid of a dataset + format string). The output should be taken from an existing extbase class which runs a database query to fetch the model with the given uid. The format string should be used to format the output. How can I achieve that?

What I tried so far:
#parsing custom tag, this works
lib.parseFunc.tags.gallery = TEXT
lib.parseFunc.tags.gallery.dataWrap = <span style="float:{parameters:float};">uid:{parameters:uid}</span>

#pass to extbase plugin, this works
lib.parseFunc.tags.gallery.postUserFunc = tx_extbase_core_bootstrap->run lib.parseFunc.tags.gallery.postUserFunc {
    pluginName = Pi1
    extensionName = XxxxMedia
    controller = Default
    action = rte
    switchableControllerActions {
        Default {
            1 = rte
        }
    }
    settings =< plugin.tx_xxxxmedia.settings
    persistence =< plugin.tx_xxxxmedia.persistence
    view =< plugin.tx_wdpmedia.view
}

#passing the tag parameters to plugin, this does not work lib.parseFunc.tags.gallery.postUserFunc {
    settings.showGallery = TEXT
    settings.showGallery.dataWrap = {parameters:uid} }

Thanks for any answers,
Stefan Terborg


More information about the TYPO3-project-typo3v4mvc mailing list