Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: MOTION-157

...

To configure a filter add a node to /server/filters:

...

heading0
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse

Image Added

...

Node name

...

Mgnl f
server

...

Mgnl f
filters

...

Mgnl f
klacker

...

Mgnl p
class

...

info.magnolia.documentation.examples.templates.KlackerFilter

...

Mgnl p
enabled

...

true

class

required

The fully qualified class name of your custom filter (which must implement

Javadoc
0info.magnolia.cms.filters.MgnlFilter
).

enabled

optional, default is true

Setting to false disables the filter.

mappings

optional

Add mappings.

...

If you have a filter which can not implement 

Javadoc
0info.magnolia.cms.filters.MgnlFilter
 for some reason but which should be registered to Magnolia filter chain, your configuration should look like this:

...

heading0
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse

Image Added

...

Node name

...

Mgnl f
filters

...

Mgnl f
anotherFilter

...

Mgnl p
class

...

info.magnolia.cms.filters.FilterDecorator

...

Mgnl n
decoratedFilter

...

Mgnl p
class

...

info.magnolia.documentation.examples.templates.AnotherFilter

...

Mgnl n
config

...

Mgnl p
myInitParam

...

some value

class

required

In this case class must be info.magnolia.cms.filters.FilterDecorator.

decoratedFilter

required

class

required

The fully qualified class name of your custom filter (which does not implement

Javadoc
0info.magnolia.cms.filters.AbstractMgnlFilter
).

config

optional

A map to add filter init parameters. You may add as many parameters as required. The init parameters can be read in the init method of the filter (see below).

...

30

Image Added

Expand
titleClick here to expand configuration for KlackerFIlter init parameters


Advanced Tables - Table Plus
heading0
enableHeadingAttributesfalse
enableSortingfalse
classm5-configuration-tree
enableHighlightingfalse

Node name

Mgnl f
filters

Mgnl f
klacker

Mgnl p
class

info.magnolia.documentation.examples.templates.KlackerFilter

Mgnl p
enabled

true

Mgnl p
klackerMessage

Klacker messages are save and reliable.

Mgnl p
maximumKlackerNumber

Init parameters for filters not implementing info.magnolia.cms.filters.MgnlFilter

...