Setting the FULL filename via the .properties file

Post here questions and problems related to editing and publishing DITA content.
tpaige
Posts: 4
Joined: Wed Mar 03, 2021 6:40 pm

Setting the FULL filename via the .properties file

Post by tpaige »

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 1096 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 1096 times
sorin_carbunaru
Posts: 402
Joined: Mon May 09, 2016 9:37 am

Re: Setting the FULL filename via the .properties file

Post by sorin_carbunaru »

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: 4
Joined: Wed Mar 03, 2021 6:40 pm

Re: Setting the FULL filename via the .properties file

Post by tpaige »

Thank you very much for your help!
Radu
Posts: 9055
Joined: Fri Jul 09, 2004 5:18 pm

Re: Setting the FULL filename via the .properties file

Post by Radu »

Hi,

As an update we released Oxygen 24 which should have a fix for issue EXM-47480 described above.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply