SV: [opencms-dev] XML-Content selected by date
Dave Schoorl
maillists at cyber-d.com
Mon Aug 21 18:00:13 CEST 2006
Ah, that is very usefull for me. Thanks a lot Stefan.
/Dave
Stefan Uldum Grinsted wrote:
> Dave said:
> " The main disadvantage is that you must register your collector in the
> config file opencms-vfs.xml"
>
> You don't have to. You can du that in you ModuleAction class. This following
> snip of code will register YourResourceCollector during startup of OpenCMS
> (given that the ModuleAction class is configured for the module)
>
> public class ModuleAction implements I_CmsModuleAction {
> /* snip */
>
> public void initialize(...) {
> // Add the resource collectors
> try {
>
> OpenCms.getResourceManager().addContentCollector(YourResourceCollector.class
> .getName(), "0");
>
> } catch (CmsConfigurationException e) {
> LOG.error("Could not add ResourceCollector", e);
> }
> }
> }
>
> Cheers, Stefan
More information about the opencms-dev
mailing list