Unicorn
Unicorn copied to clipboard
Excluding children except items matching wildcard
Do you want to request a feature or report a bug? Feature
What is the current behavior? All child items get excluded
What is the expected behavior? Child items get excluded except the items matching wildcard
Please mention your Sitecore version and Unicorn version. Sitecore 9.1 Unicorn 4.1.1
I'm making extra Conditions for Sitecore Commerce. These conditions have a EntityIdentifier and SiteCore uses that name to search for a entry in /sitecore/Commerce/Commerce Control Panel/Commerce Engine Settings/Commerce Terms/BusinessTools/Conditions For my project i would like to Unicorn only my custom items and not all the out-of-the-box items. SiteCore doesn't seek in folders underneath, so saving the items in a subdirectory wasn't the solution.
The next best thing was that I would prefix all the custom conditions with the projectName and then use that in the except in the unicorn config.
<include name="Qualifications" database="master" path="/sitecore/Commerce/Commerce Control Panel/Commerce Engine Settings/Commerce Terms/BusinessTools/Conditions">
<exclude children="true">
<except name="ProjectName_*" />
</exclude>
</include>
The simplified tree would be
- sitecore
- {...}
- Conditions
- CartAnyItemHasTagCondition
- CartAnyItemSubtotalCondition
- {...}
- ProjectName_ConditionName1
- ProjectName_ConditionName2
- Conditions
- {...}
I would like to see that Unicorn would only serialize the 2 files. Am i doing something wrong or isn't this possible with the current version of Unicorn