【发布时间】:2019-06-25 17:56:21
【问题描述】:
我为滑块创建了一个新的内容元素。我在typo3设置中添加了这些代码
EXT:rapigo\Configuration\TsConfig\Page\Mod\WebLayout\mod.tsconfig
mod.wizards.newContentElement.wizardItems.common {
elements {
rapigo_home_slider {
iconIdentifier = content-carousel-image
title = Home Slider
description = A content element to add one or more images
tt_content_defValues.CType = rapigo_home_slider
}
}
show := addToList(rapigo_home_slider)
}
EXT:rapigo\Configuration\TCA\Overrides\tt_content_my_extension_my_slider.php
Ext:rapigo\Configuration\TypoScript\myslider.typoscript
tt_content {
my_extension_my_slider < lib.contentElement
my_extension_my_slider {
templateName = HomeSlider
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
10.references.fieldName = assets
}
}
}
所有这些代码都在后端启用了一个部分,我可以在其中添加滑块内容。但是在前端重新渲染时出现错误
ERROR: Content Element with uid "26" and type "rapigo_home_slider" has no rendering definition!
我确实错过了一些东西,我不知道我必须做什么。我是 Typo3 的新手。
所以我的问题是: 1)如何为我的滑块定义模板?还请建议我必须编写代码的路径。 2) 之后我如何从内容元素中获取数据,以便从那里获取数据并将其放入我的 html 设计中。
【问题讨论】: