0

I am looking to serialize items in a way that configuration should CreateOnly for root item and than all the descendants should be deleted/updated & created as per normal. So far I have the following Json but it seems to be deleted all the items under settings

{
"name": "SiteContent",
"path": "/sitecore/content/ABCGroup/ABC",
"rules": [{
   "path": "/Settings",
   "scope": "SingleItem",
   "allowedPushOperations": "CreateOnly"
   },
],
{
   "name": "SiteSettings",
   "path": "/sitecore/content/ABCGroup/ABC/Settings",
   "scope": "DescendantsOnly",
   "rules": [
      {
        "path": "/Item Queries/*",
        "scope": "ignored"
      },
      {
      "path": "/Redirects/*",
      "scope": "ignored"
      },
      {
        "path": "/Scopes/*",
        "scope": "ignored"
      }
     ]
    
    }

I am trying to have /Settings Create only and the descendants should be create/update/delete.

0

1 Answer 1

1

Adding in an answer as I can't add json properly in the comments, can you try with the following?

{
   "name": "SiteContent",
   "path": "/sitecore/content/ABCGroup/ABC",
   "rules": [{
      "path": "/Settings",
      "scope": "SingleItem",
      "allowedPushOperations": "CreateOnly"
    }]
},
{
   "name": "SiteSettings",
   "path": "/sitecore/content/ABCGroup/ABC/Settings",
   "scope": "DescendantsOnly",
   "allowedPushOperations": "createUpdateAndDelete",
   "rules": [
      {
        "path": "/Item Queries/*",
        "scope": "ignored"
      },
      {
         "path": "/Redirects/*",
         "scope": "ignored"
      },
      {
        "path": "/Scopes/*",
        "scope": "ignored"
      }
    ]    
}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.