3

The reason why you cannot access those properties is because they are not know in the Scriban context provided by the SXA extensions. If you have i_item.CardLink in your Scriban template, that will match a Field object. This object has some properties (eg Target), but not the properties from a LinkField. And those are the ones you are requesting. There is a ...


2

Finally figured this out! Most of the links I was trying to apply this validator to were of type General Link with Search. For a field type validator to run, evidently you need to have a Field Type Validation Rules template in the Field Types folder that exactly matches the name of the field you're trying to validate. The path to this field types folder is ...


1

Try using an extension. See https://gist.github.com/auzick/c2e127ed4c6aef0f019eedc0ab738d2b. using Scriban.Runtime; using Sitecore.Data.Fields; using Sitecore.Data.Items; using Sitecore.XA.Foundation.Abstractions; using Sitecore.XA.Foundation.Scriban.Pipelines.GenerateScribanContext; using System; namespace Example.ScribanExtensions.Pipelines { public ...


Only top voted, non community-wiki answers of a minimum length are eligible