[TYPO3-dev] New page type calling plugin through Typoscript
Benjamin Beck
beck at beck-digitale-medien.de
Mon Sep 15 15:17:21 CEST 2014
Hi Olle,
please do not crosspost questions without waiting at least a day for an answer ...
( http://stackoverflow.com/questions/25846574/new-page-type-calling-plugin-through-typoscript )
I think it should look like (but i didn´t test it):
prod_page = PAGE
prod_page{
typeNum = 150
10 = USER
10{
userFunc = tx_extbase_core_bootstrap->run
pluginName = Mypluginname
extensionName = MyExtensionName
persistence.storagePid = 111
switchableControllerActions {
MyModel {
1 = myActionName
}
}
}
}
Parts borrowed from:
http://www.elp.co.at/2013/06/05/typo3-6-1-extbase-how-to-call-controller-action-via-typoscript-directly/
Greetings
Benjamin
On 15.09.2014, at 13:07, Olle Haerstedt <o.haerstedt at bitmotion.de> wrote:
> Hello!
>
> I've created a new page type with doktype = 150, and want all pages of this type to call a plugin. What is the correct way to do this using Typoscript? This is what I've got so far:
>
> [page|doktype = 150]
>
> # Typoscript for page type 150, product plugin
> prod_page = PAGE
> prod_page {
> typeNum = 1 <-- I want this to be 0!
>
> 10 = COA
> 10 < tt_content.list.20.products_pi1 <-- Calls default plugin action.
>
> 20 = TEXT
> 20 {
> stdWrap.field = productid <-- Want to use productid with plugin action.
> stdWrap = <p>|</p>
> }
> }
>
> [global]
>
> If I change typeNum to 0, the plugin won't be rendered. Do you know why?
>
> I also would like to know how to change the action called by the plugin. Now the default action is called, which is not what I want. Rather, I want another action show to be called with product id = productid from the page record.
>
> Grateful for your help.
> Olle
>
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
More information about the TYPO3-dev
mailing list