TS configuration needed. See “Reference” part.
Property: | Data type: | Description: | Default: |
|---|---|---|---|
defaultTitle | string | You can define here a layout of your choice. Eg : static string 1 static string 1 - {dynamic field} static string 1 - {dynamic field} - static string 2 {dynamic field} {dynamic field} - static string 2 etc... You can specify just one dynamic field. This dynamic field corresponds to the field name in the database table “pages”. This dynamic field must be surrounded by curly brackets { }. When you define a static string and a dynamic field for defaultTitle, the value will be considered as blank if the dynamic field value is blank, even if the static string value (of course) is not. defaultTitle is used only if currentTitle value is blank. If defaultTitle is evaluated as blank the “Page title” header field is used. | |
currentTitle | string | Like defaultTitle. tx_browserpagetitle_browser_title is the database field name corresponding to the new “Browser title” field in page header. |
[tsref:plugin.browser_page_title]
Example
You have to put some typoscript in the Setup of your main template. This is an example of the “standard“ configuration (see Reference subsection for details) :
# Including the class and calling the right function
includeLibs.tx_browserpagetitle = typo3conf/ext/browser_page_title/class.tx_browserpagetitle.php
config.titleTagFunction = tx_browserpagetitle->getTitle
# Default language parameters
plugin.browser_page_title {
defaultTitle = Bonjour tout le monde - {title}
currentTitle = {tx_browserpagetitle_browser_title}
}
# Alternative language parameters
[globalVar=GP:L=1]
plugin.browser_page_title.defaultTitle = Hello everybody - {title}
plugin.browser_page_title.currentTitle = {tx_browserpagetitle_browser_title}
[global]