[TYPO3-ttnews] Display News article title on news single page

aaron kenez aaronkenez at gmail.com
Mon Dec 10 06:44:18 CET 2012


I want my page title to look like the below on a news single page.
<title>My News Article Title - My Website Name</title>

I have the below typoscript setup on 2 sites.

config.noPageTitle = 1

page.headerData {
  100 = TEXT
  100 {
    field = title
    noTrimWrap = noTrimWrap = |<title>| - My Website Name</title>|
  }
}

[globalVar = TSFE:id = {$newsSinglePid}]
temp.newsTitle = RECORDS
temp.newsTitle {
source = {GPvar:tx_ttnews|tt_news}
source.insertData = 1
tables = tt_news
conf.tt_news >
conf.tt_news = TEXT
conf.tt_news.field=title
wrap = <title>|</title>
}
page.config.noPageTitle = 2
(Your Object) >
(Your Object) < temp.newsTitle
[global]

Outputting

tt_news 3.2.1 typo3 4.5.16
<title>My News Article Title - My Website Name</title>
<title>News Single Page Title - My Website Name</title>

tt_news 3.2.1 typo3 4.5.20
<title>News Single Page Title - My Website Name</title>

Whilst it shows two lots of titles on the first example this works as far
as the user coming to the site is concerned and for search engines etc.
When using the newer version of typo3 I don't get the first configuration
<title>My News Article Title - My Website Name</title>
I am a loss to work out how to troubleshoot this.  I turned on the admin
panel and got the below errors which I thought might be relevant.
{$meta.description}, {$meta.keywords}, {$newsSinglePid}: Constants may
remain un-substituted!!
Object Name String, "|*|" contains invalid character "|". Must be
alphanumeric or one of: "_-."

What am I missing here?

Thanks.


More information about the TYPO3-project-tt-news mailing list