Is there a way we can reuse a scriban template? I have a PromoBlock scriban template and I need to re-use that in the PromoHero and apply the Css Class to make it behave differently
This is the structure
Sitecore Stack Exchange is a question and answer site for developers and end users of the Sitecore CMS and multichannel marketing software. It only takes a minute to sign up.Sign up to join this community
You have 2 options.
Duplicate the scriban template into the
Hero variant and just add the class to the variant.
Just have one variant and use an optional Style class tick to add the CSS class that changes the behavior.
To decide which to use, think about your end-user and what would be easier for them when authoring the page.
To add an opinion, I would probably go with option 1. Sure it's not the most DRY approach. But it would give a content author a much clearer way of seeing what to do vs adding a style tick option. Especially if you make sure that the Rendering Variants have thumbnails so the authors get an idea of what they look like.