Blog by Sasha twitter linkedin

June 16, 2022

Url.Action() saves lives

 You find yourself in need of finding out what the route path is to hit an action on a SitecoreController annotated with [HttpPost].


@Url.Action("ActionName","ControllerNameWithoutTheWordContollerAtTheEnd") to the rescue! Drop it somewhere (I put it in my view) and it will resolve it with the API path that you can use with Postman to test if the endpoint is hittable.




January 22, 2021

Scriban for Sitecore tips

I will try to document code snippets that I found useful.

How to handle a treelist field - say your item has a multiselect field pointing to a bunch of items. sc_followmany should do the trick but gave me trouble, so I used this:
<script src="https://gist.github.com/Sasha-Kachanov/6eb74a3f742a56bddf7dbbb84c7bee89.js"></script>