0
votes

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 be 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.

1
It's not an extbase plugin, is it? Else, you would find a tutorial on setting the controller action here elp.co.at/2013/06/05/… - Urs
It is an extbase plugin. Thanks, I'll have a look at that tutorial. - Olle Härstedt

1 Answers

0
votes

Shouldn't the typeNum be equal to the doktype? What happens if you leave the setting away?

Also, I'm not sure if you're on the right path with how you embed your plugin.

[page|doktype = 150]

# Typoscript for page type 150, product plugin
prod_page = PAGE
prod_page {   
  10 < plugins.my_plugin
  // 10.settings.productid.data = GPvar:productid // just phantasizing here
}   

[global]