Typo3 v9.5LTS部分未渲染
为了理解在typo3中使用模板的正确方法,我从typo3 6.2到typo3 v9.5,一切都是新的。我已经实现了使用DCE,创建一个后端布局,现在我正在尝试创建一个重复的元素,以便在多个具有不同模板的页面上使用 与新的typo3安装和typo3提供的主模板相比,我可以看到他们使用了 : ext/your_模板/Resources/Private/Partials/Page/Structure/Footercontent 然后在模板中,它们呈现从主模板加载元素的html文件(我猜) 当我试图在自己的页面中复制时,我的问题就出现了。它不会在我的页面中呈现,甚至不会在html基础结构中呈现 FooterContent.html内部 以及我的主模板中的渲染调用 Home.html(模板)Typo3 v9.5LTS部分未渲染,typo3,fluid,typo3-9.x,Typo3,Fluid,Typo3 9.x,为了理解在typo3中使用模板的正确方法,我从typo3 6.2到typo3 v9.5,一切都是新的。我已经实现了使用DCE,创建一个后端布局,现在我正在尝试创建一个重复的元素,以便在多个具有不同模板的页面上使用 与新的typo3安装和typo3提供的主模板相比,我可以看到他们使用了 : ext/your_模板/Resources/Private/Partials/Page/Structure/Footercontent 然后在模板中,它们呈现从主模板加载元素的html文件(我猜) 当我试图在
FooterContent.html
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<section class="section footer-section footer-section-content">
<div class="beez_footer">
<div class="beez_footer_top beez_section">
<div class="beez_ft_left">
<f:cObject typoscriptObjectPath="lib.dynamicContent" data="{colPos: '5'}" />
</div>
<div class="beez_ft_right">
<f:cObject typoscriptObjectPath="lib.dynamicContent" data="{colPos: '6'}" />
</div>
</div>
<div class="beez_footer_middle beez_section">
<div class="beez_ft_left">
<f:cObject typoscriptObjectPath="lib.dynamicContent" data="{colPos: '7'}" />
</div>
<div class="beez_ft_middle">
<f:cObject typoscriptObjectPath="lib.dynamicContent" data="{colPos: '8'}" />
</div>
<div class="beez_ft_right">
<f:cObject typoscriptObjectPath="lib.dynamicContent" data="{colPos: '9'}" />
</div>
</div>
<div class="beez_footer_bottom beez_section">
<div class="beez_ft_left">
<f:cObject typoscriptObjectPath="lib.dynamicContent" data="{colPos: '10'}" />
</div>
<div class="beez_ft_right">
<f:cObject typoscriptObjectPath="lib.dynamicContent" data="{colPos: 11}" />
</div>
</div>
</div>
</section>
</html>
setup.typoscript(ext/your_-template/Configuration/typoscript/):
######################
#### DEPENDENCIES ####
######################
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:fluid_styled_content/Configuration/TypoScript/setup.typoscript">
################
#### HELPER ####
################
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:nubis_theme/Configuration/TypoScript/Helper/DynamicContent.typoscript">
##############
#### PAGE ####
##############
page = PAGE
page {
typeNum = 0
shortcutIcon = EXT:nubis_theme/Resources/Public/Icons/favicon.ico
10 = FLUIDTEMPLATE
10 {
# Template names will be generated automaticly by converting the applied
# backend_layout, there is no explicit mapping nessesary anymore.
#
# BackendLayout Key
# subnavigation_right_2_columns -> SubnavigationRight2Columns.html
#
# Backend Record
# uid: 1 -> 1.html
#
# Database Entry
# value: -1 -> None.html
# value: pagets__subnavigation_right_2_columns -> SubnavigationRight2Columns.html
templateName = TEXT
templateName {
cObject = TEXT
cObject {
data = pagelayout
required = 1
case = uppercamelcase
split {
token = pagets__
cObjNum = 1
1.current = 1
}
}
ifEmpty = Default
}
templateRootPaths {
0 = EXT:nubis_theme/Resources/Private/Templates/Page/
1 = {$page.fluidtemplate.templateRootPath}
}
partialRootPaths {
0 = EXT:nubis_theme/Resources/Private/Partials/Page/
1 = {$page.fluidtemplate.partialRootPath}
}
layoutRootPaths {
0 = EXT:nubis_theme/Resources/Private/Layouts/Page/
1 = {$page.fluidtemplate.layoutRootPath}
}
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
10 {
references.fieldName = media
}
20 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
20 {
levels = 2
includeSpacer = 1
as = mainnavigation
}
}
}
meta {
viewport = {$page.meta.viewport}
robots = {$page.meta.robots}
apple-mobile-web-app-capable = {$page.meta.apple-mobile-web-app-capable}
description = {$page.meta.description}
description {
override.field = description
}
author = {$page.meta.author}
author {
override.field = author
}
keywords = {$page.meta.keywords}
keywords {
override.field = keywords
}
X-UA-Compatible = {$page.meta.compatible}
X-UA-Compatible {
attribute = http-equiv
}
# OpenGraph Tags
og:title {
attribute = property
field = title
}
og:site_name {
attribute = property
data = TSFE:tmpl|setup|sitetitle
}
og:description = {$page.meta.description}
og:description {
attribute = property
field = description
}
og:image {
attribute = property
stdWrap.cObject = FILES
stdWrap.cObject {
references {
data = levelfield:-1, media, slide
}
maxItems = 1
renderObj = COA
renderObj {
10 = IMG_RESOURCE
10 {
file {
import.data = file:current:uid
treatIdAsReference = 1
width = 1280c
height = 720c
}
stdWrap {
typolink {
parameter.data = TSFE:lastImgResourceInfo|3
returnLast = url
forceAbsoluteUrl = 1
}
}
}
}
}
}
}
includeCSSLibs {
}
includeCSS {
nubis_theme_layout = EXT:nubis_theme/Resources/Public/Css/layout.min.css
}
includeJSLibs {
}
includeJS {
}
includeJSFooterlibs {
}
includeJSFooter {
nubis_theme_scripts = EXT:nubis_theme/Resources/Public/JavaScript/Dist/scripts.js
}
}
################
#### CONFIG ####
################
config {
absRefPrefix = auto
contentObjectExceptionHandler = 0
no_cache = {$config.no_cache}
uniqueLinkVars = 1
pageTitleFirst = 1
linkVars = L
prefixLocalAnchors = {$config.prefixLocalAnchors}
renderCharset = utf-8
metaCharset = utf-8
doctype = html5
removeDefaultJS = {$config.removeDefaultJS}
inlineStyle2TempFile = 1
admPanel = {$config.admPanel}
debug = 0
cache_period = 86400
sendCacheHeaders = {$config.sendCacheHeaders}
intTarget =
extTarget =
disablePrefixComment = 1
index_enable = 1
index_externals = 1
index_metatags = 1
headerComment = {$config.headerComment}
// Disable Image Upscaling
noScaleUp = 1
// Compression and Concatenation of CSS and JS Files
compressJs = 0
compressCss = 0
concatenateJs = 0
concatenateCss = 0
}
######################
####依赖关系####
######################
################
####助手####
################
##############
####页面####
##############
第页
页面{
typeNum=0
shortcutIcon=EXT:nubis_theme/Resources/Public/Icons/favicon.ico
10=流体模板
10 {
#模板名称将通过转换应用的
#后端布局,不再需要显式映射。
#
#后端布局键
#subnavigation\u right\u 2\u columns->SubnavigationRight2Columns.html
#
#后端记录
#uid:1->1.html
#
#数据库条目
#值:-1->None.html
#值:Pages\u子导航\u right\u 2\u columns->SubnavigationRight2Columns.html
templateName=文本
模板名{
cObject=文本
科宾特{
数据=页面布局
必需=1
大小写
分裂{
令牌=页__
钴=1
1.电流=1
}
}
ifEmpty=默认值
}
模板脚架{
0=EXT:nubis_主题/资源/私有/模板/页面/
1={$page.fluidtemplate.templateRootPath}
}
部分根路径{
0=EXT:nubis_主题/资源/私有/部分/页面/
1={$page.fluidtemplate.partialRootPath}
}
布局柱脚{
0=EXT:nubis_主题/资源/私有/布局/页面/
1={$page.fluidtemplate.layoutRootPath}
}
数据处理{
10=TYPO3\CMS\Frontend\DataProcessing\fileprocessor
10 {
references.fieldName=媒体
}
20=TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
20 {
级别=2
includeSpacer=1
as=主导航
}
}
}
元{
viewport={$page.meta.viewport}
robots={$page.meta.robots}
支持apple mobile web app={$page.meta.apple mobile web app}
description={$page.meta.description}
描述{
override.field=说明
}
author={$page.meta.author}
作者{
override.field=作者
}
关键词={$page.meta.keywords}
关键词{
override.field=关键字
}
X-UA-Compatible={$page.meta.Compatible}
X-UA-Compatible{
属性=http等价
}
#OpenGraph标记
og:标题{
属性=属性
字段=标题
}
og:站点名称{
属性=属性
数据=TSFE:tmpl |设置|站点标题
}
og:description={$page.meta.description}
og:说明{
属性=属性
字段=描述
}
og:图像{
属性=属性
stdWrap.cObject=文件
stdWrap.cObject{
参考资料{
数据=级别字段:-1,媒体,幻灯片
}
maxItems=1
renderObj=COA
伦德罗布{
10=IMG_资源
10 {
文件{
import.data=文件:当前:uid
治疗参考=1
宽度=1280c
高度=720摄氏度
}
stdWrap{
打字链接{
parameter.data=TSFE:lastImgResourceInfo | 3
returnLast=url
forceAbsoluteUrl=1
}
}
}
}
}
}
}
includecslibs{
}
包括{
nubis_theme_layout=EXT:nubis_theme/Resources/Public/Css/layout.min.Css
}
includeJSLibs{
}
包括{
}
includeJSFooterlibs{
}
includeJSFooter{
nubis_theme_scripts=EXT:nubis_theme/Resources/Public/JavaScript/Dist/scripts.js
}
}
################
####配置####
################
配置{
absRefPrefix=auto
contentObjectExceptionHandler=0
no_cache={$config.no_cache}
uniqueLinkVars=1
pageTitleFirst=1
linkVars=L
prefixLocalAnchors={$config.prefixLocalAnchors}
renderCharset=utf-8
metaCharset=utf-8
doctype=html5
清除故障
######################
#### DEPENDENCIES ####
######################
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:fluid_styled_content/Configuration/TypoScript/setup.typoscript">
################
#### HELPER ####
################
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:nubis_theme/Configuration/TypoScript/Helper/DynamicContent.typoscript">
##############
#### PAGE ####
##############
page = PAGE
page {
typeNum = 0
shortcutIcon = EXT:nubis_theme/Resources/Public/Icons/favicon.ico
10 = FLUIDTEMPLATE
10 {
# Template names will be generated automaticly by converting the applied
# backend_layout, there is no explicit mapping nessesary anymore.
#
# BackendLayout Key
# subnavigation_right_2_columns -> SubnavigationRight2Columns.html
#
# Backend Record
# uid: 1 -> 1.html
#
# Database Entry
# value: -1 -> None.html
# value: pagets__subnavigation_right_2_columns -> SubnavigationRight2Columns.html
templateName = TEXT
templateName {
cObject = TEXT
cObject {
data = pagelayout
required = 1
case = uppercamelcase
split {
token = pagets__
cObjNum = 1
1.current = 1
}
}
ifEmpty = Default
}
templateRootPaths {
0 = EXT:nubis_theme/Resources/Private/Templates/Page/
1 = {$page.fluidtemplate.templateRootPath}
}
partialRootPaths {
0 = EXT:nubis_theme/Resources/Private/Partials/Page/
1 = {$page.fluidtemplate.partialRootPath}
}
layoutRootPaths {
0 = EXT:nubis_theme/Resources/Private/Layouts/Page/
1 = {$page.fluidtemplate.layoutRootPath}
}
dataProcessing {
10 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
10 {
references.fieldName = media
}
20 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
20 {
levels = 2
includeSpacer = 1
as = mainnavigation
}
}
}
meta {
viewport = {$page.meta.viewport}
robots = {$page.meta.robots}
apple-mobile-web-app-capable = {$page.meta.apple-mobile-web-app-capable}
description = {$page.meta.description}
description {
override.field = description
}
author = {$page.meta.author}
author {
override.field = author
}
keywords = {$page.meta.keywords}
keywords {
override.field = keywords
}
X-UA-Compatible = {$page.meta.compatible}
X-UA-Compatible {
attribute = http-equiv
}
# OpenGraph Tags
og:title {
attribute = property
field = title
}
og:site_name {
attribute = property
data = TSFE:tmpl|setup|sitetitle
}
og:description = {$page.meta.description}
og:description {
attribute = property
field = description
}
og:image {
attribute = property
stdWrap.cObject = FILES
stdWrap.cObject {
references {
data = levelfield:-1, media, slide
}
maxItems = 1
renderObj = COA
renderObj {
10 = IMG_RESOURCE
10 {
file {
import.data = file:current:uid
treatIdAsReference = 1
width = 1280c
height = 720c
}
stdWrap {
typolink {
parameter.data = TSFE:lastImgResourceInfo|3
returnLast = url
forceAbsoluteUrl = 1
}
}
}
}
}
}
}
includeCSSLibs {
}
includeCSS {
nubis_theme_layout = EXT:nubis_theme/Resources/Public/Css/layout.min.css
}
includeJSLibs {
}
includeJS {
}
includeJSFooterlibs {
}
includeJSFooter {
nubis_theme_scripts = EXT:nubis_theme/Resources/Public/JavaScript/Dist/scripts.js
}
}
################
#### CONFIG ####
################
config {
absRefPrefix = auto
contentObjectExceptionHandler = 0
no_cache = {$config.no_cache}
uniqueLinkVars = 1
pageTitleFirst = 1
linkVars = L
prefixLocalAnchors = {$config.prefixLocalAnchors}
renderCharset = utf-8
metaCharset = utf-8
doctype = html5
removeDefaultJS = {$config.removeDefaultJS}
inlineStyle2TempFile = 1
admPanel = {$config.admPanel}
debug = 0
cache_period = 86400
sendCacheHeaders = {$config.sendCacheHeaders}
intTarget =
extTarget =
disablePrefixComment = 1
index_enable = 1
index_externals = 1
index_metatags = 1
headerComment = {$config.headerComment}
// Disable Image Upscaling
noScaleUp = 1
// Compression and Concatenation of CSS and JS Files
compressJs = 0
compressCss = 0
concatenateJs = 0
concatenateCss = 0
}
<f:render section="Footer" />
<f:render section="sectionname" arguments="{ind1:'data1', ind2:'data2'}" />
LOGO = RECORDS
LOGO.tables = tt_content
LOGO.source = 1
<div class="myClass">###LOGO###</div>
<f:cObject typoscriptObjectPath="lib.dynamicContentFunction" data="{Uid: '11'}" />
lib.dynamicContentFunction = COA
lib.dynamicContentFunction {
5 = LOAD_REGISTER
5 {
Uid.cObject = TEXT
Uid.cObject {
field = Uid
}
}
20 = CONTENT
20 {
table = tt_content
select {
includeRecordsWithoutDefaultTranslation = 1
orderBy = sorting
where = {#uid}={register:Uid}
where.insertData = 1
pidInList = -1
recursive = 99
}
stdWrap {
dataWrap = {register:wrap}
required = 1
}
}
90 = RESTORE_REGISTER
}