Skip to content

Instantly share code, notes, and snippets.

@dmitryd
Created September 7, 2015 08:43
Show Gist options
  • Save dmitryd/76f3e85c33e37a3c4ecd to your computer and use it in GitHub Desktop.
Save dmitryd/76f3e85c33e37a3c4ecd to your computer and use it in GitHub Desktop.
TYPO3: typolink that handles classes in the link field as well as having a custom class in the TypoScript
10 = LOAD_REGISTER
moreUrl {
field = linkUrl
listNum = 0
listNum.splitChar = 32
}
extraClasses {
field = linkUrl
listNum = 2
listNum.splitChar = 32
}
link {
field = linkLabel
ifEmpty.data = register:linkUrl
typolink {
parameter.data = register:linkUrl
ATagParams.dataWrap = class="{register:extraClasses} btn btn-default"
}
}
@dmitryd
Copy link
Author

dmitryd commented Sep 7, 2015

@elmar-hinz, De facto they are evaluated in order. But you can always use 10 for one register, 20 for the other, etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment