[TYPO3-mvc] share arguments with different(!) actions on same page

Peter Niederlag typo3-list at niekom.de
Wed Apr 18 16:22:54 CEST 2012


Hi,

On 18.04.2012 16:09, Bastian Waidelich wrote:
> Peter Niederlag wrote:
> 
> Hi Peter,
> 
>> I thought maybe I'd go for an extra plugin and use view.pluginNamespace
>> to pull in the arguments but that is failing as it also affects the
>> controller and action...:-<
> 
> That's actually the recommended way as switchablecontrolleractions comes
> with a lot more problems. Also, plugins are really "cheap" in Extbase.
> IMO the only drawback is, that a lot of plugins bloat the insert plugin
> dialog - but that's an issue for the core (grouped plugins, ...)

exactly, however I'd ignore that for now... ;-)

But then, do you have a working example on how to do it?

Given below config how could i access the same argument in both actions
while fencing them into their controller/action boundaries without
lowlevel plumbing? Using view.pluginNamespace I end with "controller not
allowed" which even kind of makes sense...

Tx_Extbase_Utility_Extension::configurePlugin(
	$_EXTKEY,
	'publication',
	array(
		'Publication' => 'list, show',		
	),
	// non-cacheable actions
	array(
		'Publication' => 'list',
		
	)
);

Tx_Extbase_Utility_Extension::configurePlugin(
	$_EXTKEY,
	'contact',
	array(
		'Publicationcontact' => 'show',
	),
	// non-cacheable actions
	array(
		'Publicationcontact' => '',
	)
);

I guess the use case: two "independant" instances that share arguments
but reside in different slots is quite common.

Thx and Greets
Peter
-- 
Peter Niederlag
http://www.niekom.de * TYPO3 & EDV Dienstleistungen *


More information about the TYPO3-project-typo3v4mvc mailing list