Questions tagged [scriban]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
22 views

DisableWebEdit in a Scriban template

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 { ...
0
votes
1answer
57 views

Null checks in Scriban

I want to check for null values in Scriban. {{ if (o_model.address.id) }} <div style="text-align: center;"><h5>Address {{ o_model.address.id}}</h5><br /></div> ...
2
votes
1answer
69 views

Using Model in Scriban template

Is it possible to use the current Model in Scriban? I have a CutomHeroViewModel public class CustomHeroViewModel : VariantsRenderingModel { public string HeroTitle { get; set; } public string ...
0
votes
0answers
53 views

Is there a way to access all of a page's components?

I want to create a custom scriban Processor and I need to access all of the renderings that have been put on the page. Is there a way to access that data?
1
vote
1answer
58 views

Customize Link rendering variant to append query string parameters

I want to customize an SXA link component with a rendering variant that appends query string parameters to the link based on fields on the page item. I'm using a Scriban template something like this: ...
2
votes
1answer
306 views

Accessing Link Field Values in a Scriban Template

I am using a Scriban template in Sitecore 9.3 with SXA and am attempting to render a link field. While the sc_link function reliably generates the URL, I cannot seem to find a way to access any other ...
2
votes
1answer
156 views

Is there a way to get a user object in Scriban?

I was trying to display user information inside a Scriban template (SXA variant). I managed to write a context function that gives me the full name of the user (or any profile property I put in ...
3
votes
1answer
298 views

How can I use Sitecore Rules in Scriban templates in SXA 9.3

In SXA 9.3 we have the possibility of using Scriban Templates. I wonder if there is a possibility to use Sitecore rules engine inside of those templates. Let say that I would like to render part of ...