我有几个tt_news类别项目和这些类别所属的子页面,例如:
id=1
id=2
我有以下TS“连接”页面标题和类别名称:
[globalVar = TSFE:id = 1]
temp.newsTitle = RECORDS
temp.newsTitle {
source = {GP:tx_ttnews|cat}
source.insertData = 1
tables = tt_news_cat
conf.tt_news_cat >
conf.tt_news_cat = TEXT
conf.tt_news_cat.field=title
wrap = <title>TYPO3 -|</title>
}
page.config.noPageTitle = 2
page.headerData.30 >
page.headerData.30 < temp.newsTitle
[global]
[globalVar = TSFE:id = 2]
temp.newsTitle = RECORDS
temp.newsTitle {
source = {GP:tx_ttnews|cat}
source.insertData = 1
tables = tt_news_cat
conf.tt_news_cat >
conf.tt_news_cat = TEXT
conf.tt_news_cat.field=title
wrap = <title>Other -|</title>
}
page.config.noPageTitle = 2
page.headerData.30 >
page.headerData.30 < temp.newsTitle
[global]
在输出中,页面标题如下所示:
是否可以全局连接这两个值(没有globalVar = TSFE:id = 3
)?
我尝试使用这些但是没有用:
[globalVar = GP:tx_ttnews|cat > 0]
lib.newsTitle = COA
lib.newsTitle {
10 = TEXT
10.field = title
10.noTrimWrap = ||: |
20 = RECORDS
20 {
source = {GP:tx_ttnews|cat}
source.insertData = 1
tables = tt_news_cat
conf.tt_news_cat >
conf.tt_news_cat = TEXT
conf.tt_news_cat.field=title
}
wrap = <title>|</title>
}
page.config.noPageTitle = 2
page.headerData.30 >
page.headerData.30 < temp.newsTitle
[global]
答案 0 :(得分:1)
wrap中的insertData怎么样?
temp.newsTitle = RECORDS
temp.newsTitle {
source = {GP:tx_ttnews|cat}
source.insertData = 1
tables = tt_news_cat
conf.tt_news_cat >
conf.tt_news_cat = TEXT
conf.tt_news_cat.field=title
stdWrap.wrap = <title>{page:title} -|</title>
stdWrap.insertData = 1
}
如果有效,甚至可以在没有stdWrap的情况下尝试。