[TYPO3-english] Plugin vs. Typoscript: which one goes first and how to change?

Tomasz Melcer nospam.liori at o2.pl
Mon Jul 25 18:37:02 CEST 2011


Hello,

On my webpage I decided to turn off putting <title> element
automatically, because I wanted to automatically append company name to
page titles (/appending/ is my requirement):

#v+
// This suppresses generation of <title/> element (see [1])
config.noPageTitle = 2

page = PAGE
page {
	// [...]
        headerData.10 = TEXT
        headerData.10 {
                field = title
                noTrimWrap = |<title>| - CompanyName AB</title>|
        }
}
#v-

That works and I was happy. However, later I decided to use external
pageset plugin [2]. The setup is as follows: I've got a page with title
"Online Manual", which contains this plugin (a content element) which
loads an external HTML file and displays its content. The plugin tries
to override page title with what it finds in the HTML file (in this
case: "Design Overview"), probably this way (I don't know PHP/TYPO3 code
very well, so I might be mistaken):

#v+
            $GLOBALS["TSFE"]->page["title"] = $htmlTitle;
            $GLOBALS["TSFE"]->indexedDocTitle = $htmlTitle;
#v-

This doesn't work: the page title stays "Online Manual - CompanyName"
instead of "Design Overview - CompanyName". I think this is because the
plugin code is evaluated after the part of typoscript which sets the
title--is this true?

My question: How can I make the plugin change the page title?

Tomasz Melcer

 [1]
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.5.0/view/1/6/#id2626485
 [2] http://typo3.org/extensions/repository/view/external_pageset/current/


More information about the TYPO3-english mailing list