Miranda Jones wrote:
We have a custom filter in our site designed to make a Hibernate
SessionFactory available to our Magnolia pages. In Magnolia 3.0.1,
there was a priority field that could be set for the nodes under
/server/filters and the FilterManager would use this as the order to
execute them. We needed our filter to run before MgnlCmsFilter, so we
gave ours a lower priority and everything was fine.
Now, it seems that the filters just run in the order that they are in
the admin tree. This is not much of a problem per se, but when we
initially bootstrap our custom module, our filter ends up last in the
filter chain, since the Magnolia stuff bootstraps first. We then have
to go into the admin and manually move our filter above the
/server/filters/cms node.
Is there any easy way that we can get our filter to bootstrap into the
proper order without having to manually move it?
In the version handler of your module add the following task:
new OrderNodeBeforeTask(
"Move Hibernate Filter",
"Moves the ourHibernateFilter before the cms filter",
ContentRepository.CONFIG,
"/server/filters/cms",
"ourHibernateFilter")
Cheers
Philippe
----------------------------------------------------------------
for list details see
http://documentation.magnolia.info/docs/en/editor/stayupdated.html
----------------------------------------------------------------