[opencms-dev] Custom I_CmsFileNameGenerator or CmsDefaultFileNameGenerator

Sandrine Prousteau s.prousteau at eurelis.com
Tue Mar 21 10:32:23 CET 2023


Thanks a lot!!!
\o/

Le mar. 21 mars 2023 à 10:19, Daniel Seidel via opencms-dev <
opencms-dev at opencms.org> 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
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencms.org/pipermail/opencms-dev/attachments/20230321/7dc191f4/attachment.htm>


More information about the opencms-dev mailing list