【发布时间】:2021-12-02 13:26:30
【问题描述】:
我犯了一个愚蠢的错误,我无法解决它......所以我需要你的帮助。
我在 TYPO3 版本的扩展 sitepackage builder 中创建了一个自定义内容元素。 10.4.21。
我包含了站点包构建器并开始创建自定义内容元素。
但是我忘记包含扩展名fluid_styled_content!
没有fluid_styled_content,我可以看到我使用站点包生成器创建的内容。但是我看不到fluid_styled_content的其他内容,因为我没有包含它。
现在我包含了fluid_styled_content,然后我收到一个错误:“糟糕,发生错误!代码:2021120214173488065165”我认为打字稿不再呈现我的模板......
我试图改变我的路径,但它不适用于我的方法。我会写我的代码和我在这里做了什么:
- 我一开始加了
fluid_styled_content:
- 给出了路径:
在/Configuration/TypoScript/setup.typoscript
# Path to Templates, Partials, Layouts
lib.contentElement {
templateRootPaths {
100 = EXT:mein_projektarbeit/Resources/Private/Templates/
}
partialRootPaths {
100 = EXT:mein_projektarbeit/Resources/Private/Partials/
}
layoutRootPaths {
100 = EXT:mein_projektarbeit/Resources/Private/Layouts/
}
dataProcessing {
20 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
20 {
levels = 2
includeSpacer = 1
as = mainnavigation
}
}
}
# add content elements
@import 'EXT:mein_projektarbeit/Configuration/TypoScript/ContentElements/*.typoscript'
@import 'EXT:mein_projektarbeit/Configuration/TypoScript/Helper/'
在/Configuration/TypoScript/ContentElements/OneColumnFlipbox.typoscript
tt_content {
oneColumnFlipbox_newcontentelement =< lib.contentElement
oneColumnFlipbox_newcontentelement {
templateName = OneColumnFlipbox
}
}
但路径没有显示,并且出现错误“糟糕,发生错误!”在我的页面上....
如何在打字稿中给出路径?或者我应该在哪里/什么地方多写代码?
我希望任何人都可以帮助我.... 因为对typoscript/TYPO3不太了解,所以自己做不出来..
添加: 我可以显示我的 fluid_styled_content 内容,只是为了在打字稿中添加一些代码:
30 = TYPO3\CMS\Frontend\DataProcessing\GalleryProcessor
30 {
maxGalleryWidth = {$styles.content.textmedia.maxW}
maxGalleryWidthInText = {$styles.content.textmedia.maxWInText}
columnSpacing = {$styles.content.textmedia.columnSpacing}
borderWidth = {$styles.content.textmedia.borderWidth}
borderPadding = {$styles.content.textmedia.borderPadding}
}
但这仅适用于文本媒体。
我有另一个扩展名“pizpalue”。现在我无法渲染引导程序的内容元素,如时间轴,并且出现错误ERROR: Content Element with uid "476" and type "timeline" has no rendering definition!
我没有包含 pizpalue 或 bootstrap,但会显示 bootstrap 的向导(如时间线)。所以我想我可以使用它们。我想我必须为 pizpalue 或 bootstrap 添加一些渲染作为打字稿中的扩展。 (在此之前,我通过 includeCSS 等添加了一个 Bootstrap 作为框架。)
我不明白为什么 textmedia 等自动包含在 tt_content 中,但没有时间线……我没有为 ce_column2 等添加任何东西……从哪里来的 ce_column2 或其他东西?为什么没有显示时间线?
像 fluid_styled_content 一样,我可以添加带有数据处理的渲染吗?或者有没有最好的办法?
我看到了一些类似的代码:
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:news/Configuration/TypoScript/setup.txt">
plugin.tx_news {
settings {
cssFile >
#etc.
但我不知道我应该在哪里/具体写什么...
【问题讨论】:
标签: path typo3 typoscript