Skip to content

Commit

Permalink
Merge pull request #7 from networkteam/master
Browse files Browse the repository at this point in the history
[FEATURE] Make Shariff tag attributes extensible
  • Loading branch information
hlubek committed Jul 13, 2015
2 parents dad2bf5 + e8e2d40 commit 4737cfd
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 3 deletions.
1 change: 0 additions & 1 deletion Resources/Private/Templates/NodeTypes/Shariff.html

This file was deleted.

30 changes: 28 additions & 2 deletions Resources/Private/TypoScript/Root.ts2
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,35 @@ prototype(TYPO3.Neos:Page) {
}
}

prototype(Networkteam.Neos.Shariff:Shariff) {
services = ${'"' + String.toLowerCase(Array.join(Configuration.setting('Networkteam.Neos.Shariff.options.services'),'","')) + '"'}
prototype(Networkteam.Neos.Shariff:Shariff) < prototype(TYPO3.TypoScript:Tag) {
// API
services = ${Configuration.setting('Networkteam.Neos.Shariff.options.services')}
theme = ${Configuration.setting('Networkteam.Neos.Shariff.frontend.theme')}
orientation = ${Configuration.setting('Networkteam.Neos.Shariff.frontend.orientation')}
language = ${Configuration.setting('Networkteam.Neos.Shariff.frontend.language')}

attributes {
class = 'shariff'
data-backend-url = TYPO3.TypoScript:UriBuilder {
package = 'Networkteam.Neos.Shariff'
format = 'json'
controller = 'Shariff'
action = 'counts'
}
data-services = ${String.toLowerCase(Json.stringify(services))}
data-theme = ${theme}
data-orientation = ${orientation}
data-lang = ${language}

// Put additional attributes here, see https://github.com/heiseonline/shariff#options-data-attributes
}

// Internal
@override.services = ${this.services}
@override.theme = ${this.theme}
@override.orientation = ${this.orientation}
@override.language = ${this.language}

@process.contentElementWrapping = TYPO3.Neos:ContentElementWrapping
@exceptionHandler = 'TYPO3\\Neos\\TypoScript\\ExceptionHandlers\\NodeWrappingHandler'
}

0 comments on commit 4737cfd

Please sign in to comment.