0

Is there a way we can use DisableWebEdit=true in a Scriban template?. Like on a cshtml page we can use

<title>@Html.Sitecore().Field("Title", Sitecore.Context.Item, new { DisableWebEdit = true })</title>`

This is the field I have {{i_item.Title }} but i want to make it DisableWebEdit.

1

Instead of using {{i_item.Title }} you can use the raw value of the field, that will only render the fields contents and will not add the experience editor ability:

{{i_item.Title.Raw }}

This will work for Single/Multi-line text and RichText fields.

For things like Images/Media, then you can construct the tag manually and use things like sc_medialink or the media_url to get the urls.

<img src="{{ sc_follow i_item ImageField | sc_medialink }}" />

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy