Skip to content

Commit

Permalink
[TASK] Provide ready-to-include TypoScript snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
eliashaeussler committed Apr 1, 2019
1 parent 4b08a38 commit e22bd32
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 3 deletions.
15 changes: 15 additions & 0 deletions Configuration/TypoScript/setup.typoscript
@@ -0,0 +1,15 @@
# Set final page title for meta tags
page.meta {
og:title {
data = page:title
replace = 1
}
twitter:title {
data = page:title
replace = 1
}
DC\.title {
data = page:title
replace = 1
}
}
13 changes: 10 additions & 3 deletions README.md
Expand Up @@ -4,15 +4,17 @@
# TYPO3 extension `pagetitle_ts`

This TYPO3 CMS extension provides a TypoScript hook for `getData()`. It allows
you to insert the final page title, built by the TYPO3 PageTitle API. Additionally,
the page title is combined with the TypoScript `config.pageTitle` configuration
to ensure consistency across the `<title>` and `<meta>` tags.
you to insert the final page title, built by the TYPO3 PageTitle API.

Additionally, the page title is combined with the TypoScript `config.pageTitle`
configuration to ensure consistency across the `<title>` and `<meta>` tags.


## Features

* Access final page title in TypoScript
* Apply TypoScript page title configuration on raw page title
* TypoScript snippet for automatic generation of title meta tags


## Installation
Expand All @@ -39,10 +41,15 @@ In your TypoScript, include the page title as follows:
page.meta {
og:title {
data = page:title
replace = 1
}
}
```

Alternatively, you can include the
[TypoScript shipped with this extension](Configuration/TypoScript/setup.typoscript)
to set the meta tags automatically.


## License

Expand Down

0 comments on commit e22bd32

Please sign in to comment.