我正在使用Unicorn将项目序列化到我的本地文件系统。在此配置中,我有一个包含很多项目的集合。这些项目不必序列化到我的文件系统,但是根文件夹应该。
因此,我包括了根文件夹,但是如何配置Unicorn跳过其子项呢?
<include database="master" path="/sitecore/content/mycollection" />
我希望有类似的东西
<include database="master" path="/sitecore/content/mycollection" excludeChilds="true />
或者
<include database="master" path="/sitecore/content/mycollection"><exclude "*" /></include>
最佳答案
您不可能以这种方式提出建议,尽管通过这种方式实现代码看起来并不困难。但是按模板排除不必要的项目可能很有用。这可以通过在include标签内添加以下exclude标签来实现。
<exclude template="Page" />
<exclude templateid="{8EF706F3-71D1-4EE2-BADF-99018AF186C9}" />
关于Sitecore Unicorn项目同步,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26258991/