Configurate "base filters"

Based on "base filters" you can enable or disable fields and other filters. You add a base filter by entering it´s "filter identifier" in the Dynamic fields and filters settings dialogue. You find the “filter identifier” in the settings dialog of an exposed filter, it is representing the query parameter name of that filter.

Actually you can enter any GET or POST query parameter you want and use it as base filter, so this also works with contextual filters when using a query parameter for it. For each display you can configurate a total of 9 base filters.

Condition syntax

Within the "administrative title" of a field or a filter you can use the condition syntax to only enable them if the base filter matches the given expression:

dff{1..9}|expression|"Your custom Administrative title"

Where dff{1..9} refers to a base filter.

expression is either the string value to match or a more specific expression.

in example:

dff2|foobar| expresses base filter dff2 equals "foobar"

Always use the url-decoded version of the query value in expressions. If in your url the parameter value is i.e foo+bar+foobar you would need to write:

dff2|foo bar foobar| to get a match

Expression syntax

For more specific expressions you can use the expression syntax within a condition:

dff{1..9}|{operator:expression}|

Available expression operators are:

{neq:expression} - Not equals

{in:expression,expression2,expression3} - In array (delimiter is "," without a space)

{nin:expression,expression2,expression3} - Not in array

{gt:expression} - Greater than

{lt:expression} - Smaller than

{cn:expression} - Contains

{ncn:expression} - Not contains

If the query value itself is an array like in this example query:

?types[]=foo&types[]=bar url decoded for readability

Each element will be evaluated, the expression is true if one the elements matches.

Chaining syntax

You can logically chain multiple conditions with the chaining syntax:

dff{1..9}|expression|OPERATOR|dff{1..9}|expression|"Your custom Administrative title"

Where OPERATOR is either AND, OR or XOR (uppercase), you can use a total of 10 operators per label, each must be followed by the "|dff{1..9}|expression|" pattern.

In example:

dff2|{gt:5}|AND|dff4|{in:foo,bar}|OR|dff3|foobar| (dff2 is greater than 5 AND dff4 is one of "foo" or "bar") OR dff3 matches "foobar"

For detailed information on how they work, check out the php´s Logical Operators The here provided operators work with the precedence like using "&&", "||" and "xor"

You can use the condition syntax for the base filters as well, this way you can make even more complex chaining without writing long and repeating conditions.

In depth example: Show field "Author" only if exposed "Content type" filter is "Basic Page"

Lookup the "filter identifier" of your exposed "content type" filter, i.e type and enter it in this Dynamic fields and filters settings in the advanced tab in the tab "Base filters" i.e as dff1, then you lookup the value that is used when "Basic Page" is selected, i.e page. klick on the field "Author" and go to the tab "Administrative title" and enter:

dff1|page| "Your custom Administrative title"