Created
September 5, 2014 13:18
-
-
Save nezaniel/22da6b211fd9cdd1af84 to your computer and use it in GitHub Desktop.
Attribute propagation in TS Prototypes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Abstract Box | |
prototype(EA:Box) > | |
prototype(EA:Box) < prototype(TYPO3.Neos.NodeTypes:TextWithImage) { | |
targetNode = ${q(node).property('linkTarget')} | |
targetAudience = ${q(node).property('linkTarget')?q(this.targetNode).closest('[instanceof EA:TargetAudience]').get(0):NULL} | |
@override.targetAudienceIdentifier = ${q(node).property('linkTarget')?q(this.targetAudience).property('identifier'):'default'} | |
targetAudienceIdentifier = ${targetAudienceIdentifier} | |
attributes.class = ${'target-audience-' + targetAudienceIdentifier} | |
} | |
# Slide | |
prototype(EA:Slide) > | |
prototype(EA:Slide) < prototype(EA:Box) { | |
attributes.class = ${'item ' + attributes.class} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment