Displaying custom button for a web variation of an experience fragment
Hi,
I have a button for experience fragments defined in ../experience-fragments/.content.xml as
<universaleditor
granite:class="xf-edit-master-variation"
granite:rel="cq-siteadmin-admin-actions-edit-activator"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/collection/action"
action="cq.wcm.open"
actionConfigName="granite/ui/shell/actions/edit"
activeSelectionCount="single"
relScope="item"
target="\0"
text="Universal Editor"
variant="actionBar">
<data
jcr:primaryType="nt:unstructured"
cookiePath.url="/"
href.uritemplate="/bin/wcmcommand?cmd=ue&_charset_=utf-8&path={item}"/>
</universaleditor>
The button is displayed when I select
- an experience fragment or
- a variation of the experience fragment (e.g. myfragment/master).
My goal is to pass a variation name in the item path every time when the button is clicked (this is not happening when it's not the variation selected - of course).
How can I
- display the button only if the experience fragment variation is selected or
- pass some default web variation name in the path when the experience fragment itself is selected?
Thanks,
Peter