2.16.0
✨ New Eel helper
Carbon.String.getPropertyFromNodeLink(node, value, propertyName, fallback)
Get a property from a node link. Can be used to get the title from a page who is linked via the link editor.
Example:
Expression | Result |
---|---|
Carbon.String.getPropertyFromNodeLink(site, 'node://aaaa-bbbb-ccc') |
'Title from the linked page' |
Carbon.String.getPropertyFromNodeLink(site, 'node://aaaa-bbbb-ccc', null) |
null |
Carbon.String.getPropertyFromNodeLink(null, 'node://aaaa-bbbb-ccc') |
null |
Carbon.String.getPropertyFromNodeLink(site, 'some other value') |
null |
Carbon.String.getPropertyFromNodeLink(site, 'some other value', 'title', 'fallback value') |
'fallback value' |
node
(NodeInterface) The node, usallysite
value
(string) The value to processpropertyName
(string) The name of the property to getfallback
(mixed) The fallback value if nothing is found
Full Changelog: 2.15.2...2.16.0