Specifies an alternate condition to be tested on documents that did not satisfy
previous conditions. You can chain together as many
ElseIf
calls as needed.
- Namespace
- Statiq
.Core - Containing Type
- ExecuteIf
Syntax
public ExecuteIf ElseIf(Config<bool> predicate, params IModule[] modules)
Remarks
If the config requires a document, the predicate will be evaluated against each input document individually.
Otherwise the predicate will be evaluated against the context.
Parameters
Name | Type | Description |
---|---|---|
predicate | Config |
A predicate delegate that should return a bool . |
modules | IModule[] | The modules to execute on documents where the predicate is true . |
Return Value
Type | Description |
---|---|
ExecuteIf | The current module instance. |