Typoscript USER / USER_INT objects in powermail input fields

久未见 提交于 2019-12-25 10:16:07

问题


I've a custom extension to render a value from database. I want to prefill the returned value of the extension using powermail prefill typoscript.

But when I add the plugin as userfunction, then it will display strange output in frontend.

See my typoscript code below;

lib.companyname = USER_INT
lib.companyname {
        userFunc = tx_extbase_core_bootstrap->run     
        extensionName = ExtPowermail
        pluginName = Extpowermail
        vendorName = TYPO3
        controller = Extpowermail 
        action = list  
    } 

plugin.tx_powermail.settings.setup {
  prefill {
    company < lib.companyname
  }
}

Here "company" is an input type text field in powermail. In frontend the output of the above code render like this;

<!--INT_SCRIPT.ad09b2f270243798e007be81eba0871c-->

I've changed USER_INT to USER and there is no change in the output. If anybody knows the solution, please help.


回答1:


I'm just starting out with Typo3 myself, but I needed that functionality also. I had the same problem, it started working for me when I used this:

plugin.tx_powermail.settings.setup.prefill {
   company = USER
   company {
       userFunc = tx_extbase_core_bootstrap->run     
       extensionName = ExtPowermail
       pluginName = Extpowermail
       vendorName = TYPO3
       switchableControllerActions.Extpowermail.1 = list
       }
  }

The output you are getting is some reference to the cache, as far as I know. When using switchableControllerActions it seems to stop caching the content, so you get the regular output.



来源:https://stackoverflow.com/questions/30217812/typoscript-user-user-int-objects-in-powermail-input-fields

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!