1.6.0 Support link options in inspector
What's Changed
- BUGFIX: Re-fix node links with anchors #59 by @mhsdesign in #89
- FEATURE Inspector link value object property by @mhsdesign in #44
The type: string now supports the option anchor.
In case you relied previously on the custom link editor to insert node link with anchor they will no longer be shown there but be editable in the document tab. Make sure to enable the anchor option as otherwise the anchor will go missing when selecting a new node to target.
someLink:
type: string
ui:
inspector:
editor: Sitegeist.Archaeopteryx/Inspector/Editors/LinkEditor
editorOptions:
anchor: trueThis release introduces the Sitegeist\Archaeopteryx\Link value object type
which allows for advanced usage.
'Vendor.Site:MyAwesomeNodeTypeWithALinkValueObjectProperty':
# ...
properties:
link:
type: Sitegeist\Archaeopteryx\Link
ui:
inspector:
# ...
editorOptions:
# optionally enable link options, which will be encoded into the value object.
anchor: true
title: true
relNofollow: true
targetBlank: trueAs the value object can serialize more than just the href we can also edit other link related options like title and the target.
The link value object can be queried as usual. An example rendering would look the following:
link = ${q(node).property("link")}
renderer = afx`
<a href={props.link.href} title={props.link.title} target={props.link.target} rel={props.link.rel} rel.@if={props.link.rel != []}>
My Text
</a>
`
Full Changelog: v1.5.3...1.6.0