Skip to content

Commit

Permalink
BUGFIX: props instead of context
Browse files Browse the repository at this point in the history
  • Loading branch information
rolandschuetz authored Feb 28, 2022
1 parent 6bbe435 commit 27fd461
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Resources/Private/Fusion/Prototypes/StringLink.fusion
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,32 @@ prototype(CodeQ.Link:StringLink) < prototype(Neos.Fusion:Component) {
isAsset {
condition = ${props.linkType == 'asset'}
renderer = Neos.Fusion:Value {
asset = ${Neos.Link.convertUriToObject(link, node)}
asset = ${Neos.Link.convertUriToObject(props.link, node)}
value = ${this.asset.title || String.replace(String.replace(this.asset.resource.filename, '_', ' '), '.' + this.asset.resource.fileextension, '')}
}
}
isNode {
condition = ${props.linkType == 'node'}
renderer = Neos.Fusion:Value {
node = ${Neos.Link.convertUriToObject(link, documentNode)}
node = ${Neos.Link.convertUriToObject(props.link, documentNode)}
value = ${q(this.node).closest('[instanceof Neos.Neos:Document]').property('title')}
}
}
isEmail {
condition = ${String.startsWith(link, 'mailto:')}
renderer = ${String.replace(link, 'mailto:', '')}
condition = ${String.startsWith(props.link, 'mailto:')}
renderer = ${String.replace(props.link, 'mailto:', '')}
}
isPhone {
condition = ${String.startsWith(link, 'tel:')}
renderer = ${String.replace(link, 'tel:', '')}
condition = ${String.startsWith(props.link, 'tel:')}
renderer = ${String.replace(props.link, 'tel:', '')}
}
isHttp {
condition = ${String.startsWith(link, 'http')}
renderer = ${String.pregReplace(link, '/^http(s)?:\/\//', '')}
condition = ${String.startsWith(props.link, 'http')}
renderer = ${String.pregReplace(props.link, '/^http(s)?:\/\//', '')}
}
isDoubleSlash {
condition = ${String.startsWith(link, '//')}
renderer = ${String.pregReplace(link, '/^\/\//', '')}
condition = ${String.startsWith(props.link, '//')}
renderer = ${String.pregReplace(props.link, '/^\/\//', '')}
}
fallback {
condition = true
Expand Down

0 comments on commit 27fd461

Please sign in to comment.