[Neos] Rewrite of f:link.action

Carsten Bleicker carsten at bleicker.de
Mon Apr 7 15:24:52 CEST 2014


Hi,
having a PluginView "SimpleBasket" wich calls BasketController::simpleAction().
Another PluginView "ExtendedBasket" calls BasketController::indexAction().

BasketController->simpleAction() should be available on any page. so i query its pluginView by ts and push it into the page.

so i do:
page = Page {
	parts{
		simpleBasket = PIPEU.Site:SimpleBasket{
			node = ${q(site).find('simplebasket').children('main').filter('[instanceof TYPO3.Neos:PluginView]').first()}
		}
	}
}

page template:
{parts.simpleBasket->f:format->raw()}
{content.main->f:format.raw()}

The template of BasketController->simpleAction:
<p>You have currently X items in your <f:link.action action="index">basket</f:link.action></p>

Viewing the frontendpage wich holds the pluginView of simpleBasket (basket/simplebasket.html) i have the pluginView twice on the page wich is correct.
1. the existing as node coming from children('main')
2. the second one added by {parts.simpleBasket->f:format.raw()}

The link action of the template produces two different links:

#1 - the node version: basket.html?--pipeu_site-basket[%40package]=pipeu.site
So this is the link to the page with the pluginView for BasketController::indexAction(). Correct!

#2 - the ts version: basket/simplebasket.html?--typo3_neos_nodetypes-page[%40package]=pipeu.site
This is always a link to the current page. Just switching simpleBasket ts from simpleAction to indexAction.

Why does the same PluginView produces different links?

Carsten




More information about the Neos mailing list