Skip to content

Rules (OrchardCore.Rules)

Enabling the OrchardCore.Rules module allows you to implement condition based rules.

Custom Conditions

You may create your own conditions for more complex scenarios.

You will need to implement the abstractions found in the OrchardCore.Rules.Abstractions package.

  • Condition
  • ConditionEvaluator
  • ConditionDisplayDriver
  • Appropriate views for your condition display driver.
  services
    .AddScoped<IDisplayDriver<Condition>, BooleanConditionDisplayDriver>()
    .AddCondition<BooleanCondition, BooleanConditionEvaluator, ConditionFactory<BooleanCondition>>();

Refer Layers for more information about rules and conditions.


Last update: March 10, 2021
Authors: Jasmin Savard