【发布时间】:2016-02-22 18:54:35
【问题描述】:
我在 RenderType = selectMultipleSideBySide 中为 T3 后端使用 TCA 类型选择
这里是 TCA 代码:
'features' => array(
'label' => 'Zusatz',
'config' => array(
'type' => 'select',
'renderType' => 'selectMultipleSideBySide',
'size' => 10,
'minitems' => 0,
'maxitems' => 999,
'items' => array(
array(
'Parkplätze',
'parking'
),
array(
'Freies Wlan',
'wlan'
),
)
)
),
它在后端运行良好!
但是,我现在怎样才能正确读取数据呢? 我现在不适合域/模型。
/**
* Features
*
* @var string
*/
protected $features = '';
/**
* Returns the features
*
* @return string $features
*/
public function getFeatures() {
return $this->features;
}
/**
* Sets the features
*
* @param string $features
* @return void
*/
public function setFeatures($features) {
$this->features = $features;
}
发布的调试代码:features => 'parking,wlan' (12 chars)
每个不工作的:
<f:for each="{newsItem.features}" as="featuresItem">
{featuresItem}<br />
</f:for>
感谢您的帮助!
【问题讨论】:
-
我对 extbase 的了解并不深……但我会尝试将功能作为数组返回。然后你可以遍历它们
标签: typo3 fluid typo3-7.6.x