This creates a simple view filter based on the following inputs:
· Categories
· A built in parameter name (not the same as a natural parameter name)
· A parameter value
· Desired filter name
The filter element can then be applied to Views or View Templates.
The type of filter created is a simple “Contains” rule. However, the code could be modified and extended to handle all of the various rule factory conditions (see here).