[TYPO3-mvc] Pass dynamic parameters to extbase plugin by typoscript
Stefan Terborg
terborg at simplethings.de
Tue Oct 11 08:59:01 CEST 2011
Hello Miguel,
thanks for your answer. Your code works. The problem is that you get only static parameters. But I want the uid to be dynamically taken from the TypoScript so that I can evaluate the tag data.
This:
settings.uid.dataWrap = {parameters:uid}
does not work.
Regards,
Stefan
-----Ursprüngliche Nachricht-----
Von: Miguel Ayala [mailto:miguel at socio1.de]
Gesendet: Montag, 10. Oktober 2011 18:34
An: TYPO3 v4 MVC project
Betreff: Re: [TYPO3-mvc] Pass dynamic parameters to extbase plugin by typoscript
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
>
_______________________________________________
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