Custom I_CmsFileNameGenerator or CmsDefaultFileNameGenerator

Sandrine Prousteau via opencms-dev <[email protected]>
Newsgroups gmane.comp.cms.opencms.devel
Message-ID <CAEA5ihhbBu8fMnsETaoLz0VUCjD3h4TAFfq5j=XWTqBPb0-_+A@mail.gmail.com>
Hi

On OpenCms 13 or higher, how to use a custom implementation of
I_CmsFileNameGenerator, in order to take into account a custom macro
(%(date), replaced by "yyyy-MM-dd-" formatted current date on resource
creation)?

I've tried to set if in my module handler, but it doesn't work :

OpenCms.*getResourceManager*().setNameGenerator(*new*
CmsCustomFileNameGenerator());
generate this error :
*org.opencms.configuration.CmsConfigurationException: The resource manager
configuration is possible only during system startup. {}*

PS : I still need the %(number) macro.


Thanks.

Sandrine P.

_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
https://lists.opencms.org/mailman/listinfo/opencms-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.