TYPO3Buddy
TYPO3Buddy is on FacebookTYPO3Buddy is on Twitter
menu

Custom page title extension

With this extension you can customize the page title of your site. It can create a breadcrumb like page title (showing the page titles of all pages in the rootline). It's also possible to use the custom HTML page title field when editing a page in the TYPO3 backend for a tailor made page title for SEO purposes.

Configuration

You'll have to include the configuration code in a typoscript template. The configuration for TYPO3 Buddy is here:

# generate customized page title
includeLibs.customPageTitle = EXT:re_pagetitle/tx_repagetitle.php
plugin.re_pagetitle {
    starttext = TYPO3 Buddy -
    separator =
    reverserootline = 0
    endtext = - TYPO3 Website Building Tutorial
    entrylevel = 1
    t3betitle = 1
    t3betitleaddstarttext = 0
    t3betitleaddendtext = 0
    t3betitlerootline = 0
}
[PIDinRootline = 4]
plugin.re_pagetitle {
    entrylevel = 2
}
[end]
config.titleTagFunction = tx_repagetitle->customPageTitle

The composition of the page title will be: <starttext><separator><rootline><separator><endtext>. When a separator is set, a space will be automatically appended to the start and the end of the separator. If the separator is set to nothing, a space will be used. The page titles in the rootline will also be divided by the separator. The rootline can be reversed by setting reverserootline to 1. With entrylevel the level from where the rootline starts is set.

Pages - Custom HTML page title field

When you have installed the extension, a field will be added to the pages table. In the backend, an input field will be added to the General section in the page editing form.

When you enter a value here and t3betitle is set to 1, the entire HTML page title will be replaced with this input. If it's left empty, the rootline will be used to create the HTML page title.

To append the value of the starttext property to the start of this t3betitle page title, set the t3betitleaddstarttext property to 1.

To append the value of the endtext property to the end of this t3betitle page title, set the value of the t3betitleaddendtext property to 1.

The separator will be used to separate all values, unless both t3betitleaddstarttext and t3betitleaddendtext are set to 0.

If you want to use both the rootline AND the custom page titles from the page editing form, set the value of the t3betitlerootline property to 1.

Download

The extension can be downloaded here.

The TYPO3Buddy website is a tutorial to rebuild the TYPO3Buddy website from scratch. You can choose from a TYPO3 Fluid tutorial and a TYPO3 Templavoila tutorial. You'll build TYPO3 websites like you've done so for years!