[TYPO3-english] Plugin vs. Typoscript: which one goes first and how to change?
"Christian Müller (Kitsunet)"
christian.mueller at typo3.org
Mon Jul 25 19:21:19 CEST 2011
Hi,
yes the code you posted is indeed the one responsible for changing the
title, but if I am not mistaken it can only work if TYPO3 actually
autogenerates the title, which is no longer the case if you do
config.noPageTitle = 2.
So an option is to add an extension template to that page that resets
the title generation to default, so something like
page.headerData.10 >
config.noPageTitle >
cheers,
Christian
On 11/25/7 6:37 PM, Tomasz Melcer wrote:
> 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