我写了一个Typoscript'lib'来从GET参数中获取一条tt_address记录,但是它只是在userFunc设置中以字符串表示形式显示GET。
lib.mycontenelement = USER
lib.mycontenelement {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = TtAddress
pluginName = ListView
vendorName = FriendsOfTYPO3
controller = Address
## settings, get them from GET parameters
settings < plugin.tx_ttaddress.settings
settings {
singleRecords = GP:tx_myExtension|myparam
displayMode = 100
}
## wrap out content
stdWrap {
wrap = |
}
}
在另一个Typoscript'lib'中,我使用默认的tt_address的常量,并且可以正常运行,但不能从GET参数运行。有效的源代码如下所示:
lib.mycontenelement = USER
lib.mycontenelement {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
extensionName = TtAddress
pluginName = ListView
vendorName = FriendsOfTYPO3
controller = Address
## settings, get them from plugin
settings < plugin.tx_ttaddress.settings
settings {
singleRecords = {$plugin.tx_ttaddress_pi1.uid_defaultcontact}
displayMode = 100
}
## wrap out content
stdWrap {
wrap = |
}
}
我缺少的第一个代码中有什么?设置数据的输出类似于第一个代码的此数组:
settings => array(5 items)
...
singleRecords => 'GP:tx_myExtension|myparam' (25 chars)
...
第二个代码段的设置数据如下:
settings => array(5 items)
...
singleRecords => '1' (1 chars)
...
因此,似乎GET参数并未在第一个代码段内转换。我该如何运作?有人有主意吗?
致谢