Yep! You can do it by adding Rule item under your Sriban template item and using
sc_evaluate function inside of the template.
I have a page which has two fields:
And I want to render Brand field only when it is Monday.
In order to do that I'm using Page Content rendering (can be any other) with following rendering variant:
And the rule looks like this:
That is pretty it! The
sc_evaluate i_item "DayOfWeek" in the
if statement will evaluate the "DayOfWeek" rule against context item and base on this will render the Brand field or not.
If you would like to evaluate the rule against other embedded objects (e.g.: data source item) the list of those you will find here.