From 29fa0bcbfdfe471deebee680ff818e5db5487524 Mon Sep 17 00:00:00 2001 From: Philipp Roski Date: Thu, 20 Aug 2015 15:20:37 +0200 Subject: [PATCH 1/3] [FIX] Fix wrong namespace for class UrlService --- Classes/Service/UrlService.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Classes/Service/UrlService.php b/Classes/Service/UrlService.php index 15c9c19..a27efd0 100644 --- a/Classes/Service/UrlService.php +++ b/Classes/Service/UrlService.php @@ -1,6 +1,5 @@ Date: Thu, 20 Aug 2015 16:50:11 +0200 Subject: [PATCH 2/3] [TASK] Set meta tags via page.meta --- Configuration/TypoScript/setup.txt | 164 +++++++++++++++++------------ 1 file changed, 94 insertions(+), 70 deletions(-) diff --git a/Configuration/TypoScript/setup.txt b/Configuration/TypoScript/setup.txt index 958612d..a40c7a4 100644 --- a/Configuration/TypoScript/setup.txt +++ b/Configuration/TypoScript/setup.txt @@ -1,88 +1,112 @@ +#################### +#### SEO BASICS #### +#################### plugin.tx_seobasics > plugin.tx_seobasics = COA plugin.tx_seobasics { + # Append a line break for every header tag + 5 = TEXT + 5.char = 10 - # Append a line break for every header tag - 5 = TEXT - 5.value ( + # Building the page title + 10 = TEXT + 10 { + data = page:tx_seo_titletag // page:title + trim = 1 + stdWrap.stdWrap.append = TEXT + stdWrap.stdWrap.append.data = TSFE:tmpl|sitetitle + stdWrap.stdWrap.append.trim = 1 + stdWrap.stdWrap.append.required = 1 + stdWrap.stdWrap.append.if.isTrue = {$plugin.tx_seo.titleWrapAppendSiteTitle} + stdWrap.stdWrap.append.noTrimWrap = | - || + stdWrap.noTrimWrap = {$plugin.tx_seo.titleWrap} + stdWrap.insertData = 1 + htmlSpecialChars = 1 + wrap = | + append = TEXT + append.char = 10 + } - -) + # Building the canonical tag + 60 = TEXT + 60 < .10 + 60 { + data > + stdWrap > - # Building the page title - 10 = TEXT - 10.data = page:tx_seo_titletag // page:title - 10.trim = 1 - 10.stdWrap.stdWrap.append = TEXT - 10.stdWrap.stdWrap.append.data = TSFE:tmpl|sitetitle - 10.stdWrap.stdWrap.append.trim = 1 - 10.stdWrap.stdWrap.append.required = 1 - 10.stdWrap.stdWrap.append.if.isTrue = {$plugin.tx_seo.titleWrapAppendSiteTitle} - 10.stdWrap.stdWrap.append.noTrimWrap = | - || - 10.stdWrap.noTrimWrap = {$plugin.tx_seo.titleWrap} - 10.stdWrap.insertData = 1 - 10.htmlSpecialChars = 1 - 10.wrap = | - 10.append < .5 - - 20 < .10 - 20.wrap = - - - # Building the Keywords tag - 30 = TEXT - 30 < .10 - 30.data = page:keywords - 30.stdWrap.noTrimWrap = {$plugin.tx_seo.keywordsWrap} - 30.stdWrap.stdWrap > - 30.required = 1 - 30.wrap = + cObject = USER + cObject.userFunc = B13\SeoBasics\Service\UrlService->getCanonicalUrl + #cObject.useDomain = current + required = 1 + if.isTrue = {$plugin.tx_seo.enableCanonicalTag} + wrap = + append = TEXT + append.char = 10 + } +} +############## +#### PAGE #### +############## +page { + meta { + # Building the page title + title < plugin.tx_seobasics.10 + title { + wrap > + } - # Building the Description tag - 40 = TEXT - 40 < .30 - 40.data = page:description - 40.stdWrap.noTrimWrap = {$plugin.tx_seo.descriptionWrap} - 40.wrap = + # Building the description tag + description { + override.field = description + stdWrap.noTrimWrap = {$plugin.tx_seo.descriptionWrap} + stdWrap.stdWrap > + required = 1 + } + # Building the keywords tag + keywords { + override.field = keywords + stdWrap.noTrimWrap = {$plugin.tx_seo.keywordsWrap} + stdWrap.stdWrap > + required = 1 + } - # Building the date tag (last changed) - 50 = TEXT - 50 < .10 - 50.data = page:SYS_LASTCHANGED // page:crdate - 50.date = Y-m-d - 50.stdWrap > - 50.wrap = + # Building the date tag (last changed) + date = TEXT + date { + override.field = date + data = page:SYS_LASTCHANGED // page:crdate + date = Y-m-d + stdWrap > + } + } - # Building the canonical tag - 60 = TEXT - 60 < .10 - 60.data > - 60.cObject = USER - 60.cObject.userFunc = B13\SeoBasics\Service\UrlService->getCanonicalUrl - #60.cObject.useDomain = current - 60.required = 1 - 60.if.isTrue = {$plugin.tx_seo.enableCanonicalTag} - 60.stdWrap > - 60.wrap = + # Activate SEO in main "page." configuration + headerData.776 = < plugin.tx_seobasics } -# activate SEO in main "page." configuration -config.noPageTitle = 2 -page.headerData.776 = < plugin.tx_seobasics +################ +#### CONFIG #### +################ +config { + # Disabled tag because we render it on our own + noPageTitle = 2 +} -# Include sitemap.xml +############### +### SITEMAP ### +############### tx_seo_xmlsitemaps = PAGE tx_seo_xmlsitemaps { - typeNum = 776 - config.disableAllHeaderCode = 1 - config.renderCharset = utf-8 - config.additionalHeaders = Content-type: text/xml - config.xhtml_cleaning = 0 - 10 = USER - 10.userFunc = B13\SeoBasics\Controller\SitemapController->renderXMLSitemap - 10.resolveMainShortcut = 1 -} + typeNum = 776 + config.disableAllHeaderCode = 1 + config.renderCharset = utf-8 + config.additionalHeaders = Content-type: text/xml + config.xhtml_cleaning = 0 + 10 = USER + 10.userFunc = B13\SeoBasics\Controller\SitemapController->renderXMLSitemap + 10.resolveMainShortcut = 1 +} \ No newline at end of file From d79de4f04b00ea1b8580e0cd91a53aa3395e448c Mon Sep 17 00:00:00 2001 From: Philipp Roski <philipp.roski@wfp2.com> Date: Fri, 21 Aug 2015 09:19:06 +0200 Subject: [PATCH 3/3] [FIX] Convert spaces to tabs --- Configuration/TypoScript/setup.txt | 154 ++++++++++++++--------------- 1 file changed, 77 insertions(+), 77 deletions(-) diff --git a/Configuration/TypoScript/setup.txt b/Configuration/TypoScript/setup.txt index a40c7a4..77f4168 100644 --- a/Configuration/TypoScript/setup.txt +++ b/Configuration/TypoScript/setup.txt @@ -4,86 +4,86 @@ plugin.tx_seobasics > plugin.tx_seobasics = COA plugin.tx_seobasics { - # Append a line break for every header tag - 5 = TEXT - 5.char = 10 + # Append a line break for every header tag + 5 = TEXT + 5.char = 10 - # Building the page title - 10 = TEXT - 10 { - data = page:tx_seo_titletag // page:title - trim = 1 - stdWrap.stdWrap.append = TEXT - stdWrap.stdWrap.append.data = TSFE:tmpl|sitetitle - stdWrap.stdWrap.append.trim = 1 - stdWrap.stdWrap.append.required = 1 - stdWrap.stdWrap.append.if.isTrue = {$plugin.tx_seo.titleWrapAppendSiteTitle} - stdWrap.stdWrap.append.noTrimWrap = | - || - stdWrap.noTrimWrap = {$plugin.tx_seo.titleWrap} - stdWrap.insertData = 1 - htmlSpecialChars = 1 - wrap = <title>| - append = TEXT - append.char = 10 - } + # Building the page title + 10 = TEXT + 10 { + data = page:tx_seo_titletag // page:title + trim = 1 + stdWrap.stdWrap.append = TEXT + stdWrap.stdWrap.append.data = TSFE:tmpl|sitetitle + stdWrap.stdWrap.append.trim = 1 + stdWrap.stdWrap.append.required = 1 + stdWrap.stdWrap.append.if.isTrue = {$plugin.tx_seo.titleWrapAppendSiteTitle} + stdWrap.stdWrap.append.noTrimWrap = | - || + stdWrap.noTrimWrap = {$plugin.tx_seo.titleWrap} + stdWrap.insertData = 1 + htmlSpecialChars = 1 + wrap = | + append = TEXT + append.char = 10 + } - # Building the canonical tag - 60 = TEXT - 60 < .10 - 60 { - data > - stdWrap > + # Building the canonical tag + 60 = TEXT + 60 < .10 + 60 { + data > + stdWrap > - cObject = USER - cObject.userFunc = B13\SeoBasics\Service\UrlService->getCanonicalUrl - #cObject.useDomain = current - required = 1 - if.isTrue = {$plugin.tx_seo.enableCanonicalTag} - wrap = - append = TEXT - append.char = 10 - } + cObject = USER + cObject.userFunc = B13\SeoBasics\Service\UrlService->getCanonicalUrl + #cObject.useDomain = current + required = 1 + if.isTrue = {$plugin.tx_seo.enableCanonicalTag} + wrap = + append = TEXT + append.char = 10 + } } ############## #### PAGE #### ############## page { - meta { - # Building the page title - title < plugin.tx_seobasics.10 - title { - wrap > - } + meta { + # Building the page title + title < plugin.tx_seobasics.10 + title { + wrap > + } - # Building the description tag - description { - override.field = description - stdWrap.noTrimWrap = {$plugin.tx_seo.descriptionWrap} - stdWrap.stdWrap > - required = 1 - } + # Building the description tag + description { + override.field = description + stdWrap.noTrimWrap = {$plugin.tx_seo.descriptionWrap} + stdWrap.stdWrap > + required = 1 + } - # Building the keywords tag - keywords { - override.field = keywords - stdWrap.noTrimWrap = {$plugin.tx_seo.keywordsWrap} - stdWrap.stdWrap > - required = 1 - } + # Building the keywords tag + keywords { + override.field = keywords + stdWrap.noTrimWrap = {$plugin.tx_seo.keywordsWrap} + stdWrap.stdWrap > + required = 1 + } - # Building the date tag (last changed) - date = TEXT - date { - override.field = date - data = page:SYS_LASTCHANGED // page:crdate - date = Y-m-d - stdWrap > - } - } + # Building the date tag (last changed) + date = TEXT + date { + override.field = date + data = page:SYS_LASTCHANGED // page:crdate + date = Y-m-d + stdWrap > + } + } - # Activate SEO in main "page." configuration - headerData.776 = < plugin.tx_seobasics + # Activate SEO in main "page." configuration + headerData.776 = < plugin.tx_seobasics } @@ -91,8 +91,8 @@ page { #### CONFIG #### ################ config { - # Disabled tag because we render it on our own - noPageTitle = 2 + # Disabled <title> tag because we render it on our own + noPageTitle = 2 } @@ -101,12 +101,12 @@ config { ############### tx_seo_xmlsitemaps = PAGE tx_seo_xmlsitemaps { - typeNum = 776 - config.disableAllHeaderCode = 1 - config.renderCharset = utf-8 - config.additionalHeaders = Content-type: text/xml - config.xhtml_cleaning = 0 - 10 = USER - 10.userFunc = B13\SeoBasics\Controller\SitemapController->renderXMLSitemap - 10.resolveMainShortcut = 1 + typeNum = 776 + config.disableAllHeaderCode = 1 + config.renderCharset = utf-8 + config.additionalHeaders = Content-type: text/xml + config.xhtml_cleaning = 0 + 10 = USER + 10.userFunc = B13\SeoBasics\Controller\SitemapController->renderXMLSitemap + 10.resolveMainShortcut = 1 } \ No newline at end of file