[TYPO3-mvc] Plugin in TypoScript - pass arguments to it?

Tim Schoch | GSTALTIG tim.schoch at gstaltig.ch
Fri Mar 2 16:14:10 CET 2012


Hello list
I'm using the news plugin from georg ringer inside my show action to display related news articles. 
Showing the news plugin in general works fine, but I need to pass some data from my extension to the news plugin.

This is my TypoScript:
news = USER
  news {
    userFunc = tx_extbase_core_bootstrap->run
    extensionName = News
    pluginName = Pi1
    controller = News
    action = list
    switchableControllerActions {
      News {
        1 = list
      }
    }
    settings < plugin.tx_news.settings
    persistence < plugin.tx_news.persistence
    view < plugin.tx_news.view
  }
}

I call this in my template with the cObject ViewHelper
<f:cObject typoscriptObjectPath="plugin.tx_myext.settings.plants.show.news" data="{overwriteDemand:{foo:'bar'}}"/>

News' listAction has an argument «overwriteDemand» that allows to filter the news articles.
I need to create this array inside my extension and pass it to the news plugin. How can this be achieved?
Thanks, Tim


More information about the TYPO3-project-typo3v4mvc mailing list