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

Miguel Ayala miguel at socio1.de
Mon Oct 10 18:33:50 CEST 2011


Hello,
if I understand you right, it should be like this:

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 {
                 uid = 123
                 bla = blu
     }
     [...]


and in your Controller you get them through

$this->settings['uid'];
$this->settings['bla']

regards
miguel



On 10/10/2011 05:55 PM, Stefan Terborg wrote:
> 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
>          }
>      }
>      	 =<  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
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
>


More information about the TYPO3-project-typo3v4mvc mailing list