I have couple of tt_news category items and subpages on which these categories belong, for example:
- www.example.com/typo3/category/typoscript.html -
id=1
- www.example.com/other/category/seo.html -
id=2
I have following TS who "connect" page title and category name:
[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]
In output the title of pages looks like this:
- TYPO3 - TypoScript
- Other - SEO
Is it possible to connect those two values globally (without globalVar = TSFE:id = 3
)?
I try with these but it didn't work:
[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]