Setting the FULL filename via the .properties file

tpaige
Posts: 2
Joined: Wed Mar 03, 2021 6:40 pm

Setting the FULL filename via the .properties file

Post by tpaige » Wed Mar 03, 2021 7:22 pm

When creating a new document from a template, I understand that you can customize a filename using via the filenamePrefix and filenameSuffix parameters. Is it possible to set the ENTIRE filename? I would like the generated filename to contain ONLY the current date, for example, 2021_01_01.dita.

What I've done:
  • Disabled the "Use the title to generate the file name" option in DITA / topics.
    image.png
    image.png (16.27 KiB) Viewed 122 times
  • Added filenamePrefix=${date(yyyy_MM_dd)}

The generated filename contains the "untitledxx" string. Is there a way to prevent this from happening so that the generated filename contains ONLY the date?
image.png
image.png (21.31 KiB) Viewed 122 times

sorin_carbunaru
Posts: 362
Joined: Mon May 09, 2016 9:37 am

Re: Setting the FULL filename via the .properties file

Post by sorin_carbunaru » Thu Mar 04, 2021 12:10 pm

Hello,

I cannot think of a way of properly doing this. I believe that usually a filename is manually provided or generated based on the title, to reflect the content.

If you don't need a title for your DITA topic, perhaps you could re-enable the option to generate the filename from the title, and only provide an underscore as the title. We have an extra-processing step that removes leading underscores from the filename, but we still try to generate a name from the title, and you should get the desired result ("untitled" is removed). It looks like a fortunate coincidence for your use-case.

Unfortunately, there is a bug when trying to set the prefix in the text field, and often times you won't be able to do this, because of the special characters of the editor variable ($, {, }). I logged this issue internally on EXM-47480.

Best wishes,
Sorin Carbunaru
Oxygen XML Editor

tpaige
Posts: 2
Joined: Wed Mar 03, 2021 6:40 pm

Re: Setting the FULL filename via the .properties file

Post by tpaige » Thu Mar 04, 2021 7:50 pm

Thank you very much for your help!

Post Reply