Documentation · ViewHelper reference

XSD schema file | vhs master

Page / Header / TitleViewHelper

ViewHelper used to override page title

This ViewHelper uses the TYPO3 PageRenderer to set the page title - with everything this implies regarding support for TypoScript settings.

Specifically you should note the setting config.noPageTitle which must be set to either 1 (one) in case no other source defines the page title (it's likely that at least one does), or 2 (two) to indicate that the TS-controlled page title must be disabled. A value of 2 (two) ensures that the title used in this ViewHelper will be used in the rendered page.

If you use the ViewHelper in a plugin it has to be USER not USER_INT, what means it has to be cached!

Why can I not forcibly override the title?

This has been opted out with full intention. The reasoning behind not allowing a Fluid template to forcibly override the page title that may be set through TypoScript is that many other extensions (mainly SEO-focused ones) will be setting and manipulating the page title - and if overridden in a template file using a ViewHelper, it would be almost impossible to detect unless you already know exactly where to look. Enforcing use of the core behavior is the only way to ensure that this ViewHelper can coexist with other extensions in a fully controllable way. /

  • Tag usage example

    <v:page.header.title title="NULL" whitespaceString="' '" setIndexedDocTitle="1">
    	<!-- tag content - may be ignored! -->
    </v:page.header.title>
  • Inline usage example

    {v:page.header.title(title: 'NULL', whitespaceString: '' '', setIndexedDocTitle: 1)}

Arguments

Argument Description Type
setIndexedDocTitle

Set indexed doc title to title

boolean
title

Title tag content

string
whitespaceString

String used to replace groups of white space characters, one replacement inserted per group

string
Required attribute

Revision history

commit ec2a5f73494e5dbbd09fe75a3bb2b8cb93f8c1a7
Author: Claus Due <*****@wildside.dk>
Date:   Sat Nov 3 13:48:24 2012 +0100

    [FEATURE] Page ViewHelpers
    
    Adds all page related ViewHelpers: content fetcher/renderer, footer
    data insert, header link/meta/title, absolute url, menu and breadcrumb
    ViewHelpers.

commit fcf6f3491e96b6791f166c5b0325078faca52c19
Author: Claus Due <*****@wildside.dk>
Date:   Mon Nov 5 01:23:54 2012 +0100

    [BUGFIX] Fix inheritance, Page / Header / Title ViewHelper

commit bccb5862a5332ed92d6d3f58b6c7ef57c283fc6d
Author: Roland Waldner <*****@gmail.com>
Date:   Sat Dec 15 19:33:53 2012 +0100

    [TASK] Add an argument "whitespaceString" to Tx_Vhs_ViewHelpers_Page_Header_TitleViewHelper

commit e28893d52f81f9bbaceb1d1d00f01245151ec3c5
Author: Claus Due <*****@wildside.dk>
Date:   Wed Apr 24 20:16:17 2013 +0200

    [DOC] Full doc comment for Page / Header / Title ViewHelper
    
    Fixes: #122

commit c7ea6b095ac5edfbd0084fc15b395c4cba3bccd6
Author: Benjamin Rau <*****@codearts.at>
Date:   Wed Sep 4 15:14:14 2013 +0200

    [DOC] Info about plugin has to be cached
    
    A plugin or controlleraction has to be cached to be able to affect the titlewith this viewhelper.
    
    Added information to doccomments about this.

commit 5d2bc561fdf2751997c9d2fbda6bab8c2bd7a33d
Author: Nikolas Hagelstein <*****@gmail.com>
Date:   Fri Nov 22 17:29:29 2013 +0100

    [FEATURE] Set indexed doc title to title optionally
    
    [TASK] Changed intention to tabs. sorry.
    
    [TASK] CGL
    [TASK] Changed default value for setIndexedIocTitle to false

commit da31bad1d9bb058c072ddb5591e8ed907a1ae8e1
Author: Claus Due <*****@namelesscoder.net>
Date:   Tue Dec 31 23:08:37 2013 +0100

    [TASK] Happy new year!

commit d2e531da034976e6db1478eef5a8478595fd16fe
Author: Claus Due <*****@namelesscoder.net>
Date:   Sun Jan 5 00:45:10 2014 +0100

    [TASK] Migrate to using namespace core class names

commit 52bd6e41ccfef3d8193b350153912a9716e6a087
Author: Benjamin Rau <*****@codearts.at>
Date:   Tue Apr 1 21:09:00 2014 +0200

    [TASK] CGL compliance

commit da7677bc74f14e9a9300e4ba4487e52c3cb97642
Author: Claus Due <*****@namelesscoder.net>
Date:   Sun Apr 20 01:13:33 2014 +0200

    [TASK] Switch to namespaces

commit 8bb2fc5ee124ba19b0a0ab8e061c9a153fc4651f
Author: Xaver Maierhofer <*****@xwissen.info>
Date:   Sun Jan 18 17:56:13 2015 +0100

    [TASK] Reference Copyright to license.md file