Re: Custom I_CmsFileNameGenerator or CmsDefaultFileNameGenerator
Sandrine Prousteau via opencms-dev <[email protected]>
| Newsgroups | gmane.comp.cms.opencms.devel |
|---|---|
| Message-ID | <CAEA5ihgujyj+OMHLWpLC83-ruOJBaq5jTit=mj9ayQWDSNM_sg@mail.gmail.com> |
Thanks a lot!!! \o/ Le mar. 21 mars 2023 à 10:19, Daniel Seidel via opencms-dev < [email protected]> a écrit : > Hi Sandrine, > > in the opencms-vfs.xml, right above the <mimetypes> element you have to > add an element <namegenerator class="my.custom.FileNameGenerator" /> > > Best, Daniel. > Am 21.03.23 um 10:16 schrieb Sandrine Prousteau via opencms-dev: > > 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 visithttps://lists.opencms.org/mailman/listinfo/opencms-dev > > > -- > Kind Regards > > Daniel. > > ------------------- > > Daniel Seidel > Alkacon Software GmbH & Co. KG - The OpenCms Expertshttps://www.alkacon.com - http://www.opencms.org > > _______________________________________________ > 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 > > > > _______________________________________________ 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