Search code examples
groovycrafter-cms

On a Groovy script in Crafter CMS, how do I modify a siteItem and store the changes?


On a groovy rest script, I want to trigger some changes to a group of pages (as returned by Crafter Search), so I start by getting

siteItemService.getSiteItem( pages[1].localId )

Now, I would like to change some fields and store them, but, how do I do both things in CrafterCMS?


Solution

  • You can't make content changes using Crafter Engine, as it's a delivery system. For content changes, you'll need to use Crafter Studio and its workflow mechanics.