Skip to content

Commit

Permalink
Merge pull request #9 from TheLalaMan/feature/do-not-show-tracking-co…
Browse files Browse the repository at this point in the history
…de-with-empty-configuration

Do not show the tracking code with empty or invalid settings
  • Loading branch information
koernchen02 authored Dec 16, 2016
2 parents 86bcac9 + ee6a43e commit 431131e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 8 additions & 1 deletion Resources/Private/TypoScript/Prototypes/TrackingCode.ts2
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# A Piwik tracking code object
#
prototype(Portachtzig.Neos.Piwik:TrackingCode) < prototype(TYPO3.TypoScript:Template) {
@if.inLiveWorkspace = ${node.context.workspaceName == 'live'}
templatePath = 'resource://Portachtzig.Neos.Piwik/Private/Templates/Prototypes/TrackingCode.html'
settings = ${Configuration.setting('Portachtzig.Neos.Piwik')}

// Show tracking code only in live workspace and if all necessary parameters are set
@if {
inLiveWorkspace = ${node.context.workspaceName == 'live'}
hostIsSet = ${settings.host}
idSiteIsSet = ${settings.idSite}
}
}
6 changes: 1 addition & 5 deletions Resources/Private/TypoScript/Root.ts2
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,5 @@ prototype(TYPO3.Neos:Page) {
piwikTrackingCode = Portachtzig.Neos.Piwik:TrackingCode {
# Google suggests to include the tracking code directly after the <body> tag
@position = 'end'
settings = ${Configuration.setting('Portachtzig.Neos.Piwik')}

}
}


}

0 comments on commit 431131e

Please sign in to comment.