Skip to content

Instantly share code, notes, and snippets.

@chriwo
Created August 22, 2017 08:08
Show Gist options
  • Save chriwo/4b4350d746bb6626fc317eeda7eeba4f to your computer and use it in GitHub Desktop.
Save chriwo/4b4350d746bb6626fc317eeda7eeba4f to your computer and use it in GitHub Desktop.
Include MetaTags with typoscript and integrate an condition for tx_news
page = PAGE
page {
meta {
viewport = {$page.meta.viewport}
format-detection = telephone=no
robots = {$page.meta.robots}
google = {$page.meta.google}
apple-mobile-web-app-capable = {$page.meta.apple-mobile-web-app-capable}
description {
data = DB:pages:{$page.customer.defaultPageUid}:description
override.field = description
stdWrap.noTrimWrap = |||
}
author.data = DB:pages:{$page.customer.defaultPageUid}:author
author.override.field = author
keywords {
data = DB:pages:{$page.customer.defaultPageUid}:keywords
override.field = keywords
stdWrap.noTrimWrap = |||
}
}
}
# Remove default meta tags on tx_news detail page
[globalVar = GP:tx_news_pi1|news > 0]
page {
config {
noPageTitle = 0
}
headerData {
5 >
}
meta {
description >
author >
keywords >
}
}
[end]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment