Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sitecore Unicorn item synchronisation

I am using Unicorn for item serialization to my local file system. In this configuration I have a collection which contains a lot of items. These items don't have to be serialized to my file system, but the root folder should.

So I included the root folder, but how can I configure Unicorn to skip its child items?

<include database="master" path="/sitecore/content/mycollection" />

I would expect something like

<include database="master" path="/sitecore/content/mycollection" excludeChilds="true />

or

<include database="master" path="/sitecore/content/mycollection"><exclude "*" /></include>
like image 838
Sander Bouwmeester Avatar asked Oct 08 '14 14:10

Sander Bouwmeester


1 Answers

If you are using Unicorn 3, it is now possible to skip child items by adding a trailing slash.

<include database="master" path="/sitecore/content">
    <exclude path="/sitecore/content/" />
</include>

See: http://kamsar.net/index.php/category/Unicorn/#Exclude_all_children_with_the_predicate for more information.

like image 129
elkaz Avatar answered Dec 03 '22 18:12

elkaz