[TYPO3-ttnews] Exchanging page title completely (Dev question?)

Christian Lerrahn typo3 at penpal4u.net
Thu Feb 2 03:12:45 CET 2006


Hi,
I've asked for this before but didn't get any replies to my remaining
problem. So I checked the code to find out what the problem was. However,
that got me even more confused. Maybe someone here can clarify things a
bit...

If I use substitutePagetitle = 1 this is what will happen in the code

// set the title of the single view page to the title of the news record
if ($this->conf['substitutePagetitle']) {
  $GLOBALS['TSFE']->page['title'] = $row['title'];
  // set pagetitle for indexed search to news title
  $GLOBALS['TSFE']->indexedDocTitle = $row['title'];
}

From my point of view this would make the core engine assume that the
title of this page is the news title and therefore all instances of
titles should be changed. However, this code will only lead to a different
title in the HTML header whereas a reference to "title" in the template
seems to still read the old title. In my case that means that a graphical
title for the page is rendered according to the page name in the backend
and not according to the news displayed. The graphical title will
therefore be e.g. "News single view" instead of "Three killed in
accident". Now I could trick my template into displaying the right thing
by erasing that graphical title and using single view with a graphical
title instead. As this is a very dirty way of doing things, I'd like to
avoid it though.
I reckon that the graphical title is generated before the page title is
overwritten by tt_news. Is that the case? If so, is there any way to keep
it from being generated till the title has been changed?

Cheers,
Christian

-- 
    Steh  ab  vom Zorn und lass den Grimm, entrüste dich nicht, damit
    du nicht Unrecht tust.
    
    Psalm 37,8



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