Page 1 of 1

Flattening URL link for my online help

Posted: Wed Apr 05, 2023 8:54 pm
by Sitrakar
Hello,
For my online help, I have the structure of my Dita file source like : Pages/topic/file.dita. So, when I create a page the href is href = ../Pages/topic/file.dita. After the webhelp transformation scenario, the link for the page is website.com/Pages/topic/file.url. We use that structure to have a clean representation of our source (dita files) and know where they are if we want to move them.
So my question is, is it possible to keep that structure pages/topic/file.dita but to flatten the url link like : website.com/file.url. We want to get rid of the /Pages/topic in the url of the online Help.
Best regards,
Sitrakar

Re: Flattening URL link for my online help

Posted: Fri Apr 07, 2023 2:37 pm
by chrispitude
Hi Sitrakar,

This is a characteristic of how the DITA Open Toolkit itself publishes DITA to HTML output. During the transformation, DITA input files are transformed to HTML output files. This behavior is pretty fundamental to how the transformation works.

There is a rewrite rule feature in the DITA-OT to allow the output file structure to be modified, but it has some limitations:
If both of these were implemented, you would be able to flatten the directory structure in the WebHelp output (or make any other arbitrary change you wanted, such as partial or selective flattening, renaming, etc.). These both represent some work and they are not quick fixes, but the resulting functionality would be very useful for WebHelp.

Re: Flattening URL link for my online help

Posted: Fri Apr 07, 2023 4:36 pm
by Sitrakar
Thanks chrispitude,
I will try it.

Re: Flattening URL link for my online help

Posted: Fri Apr 07, 2023 7:53 pm
by Sitrakar
I'm using oxygen XML author 24 software with webhelp responsive as a transformation scenario instead of DITA OT. Is the workflow the same for the rewrite rule for oxygen XML?

Re: Flattening URL link for my online help

Posted: Mon Apr 10, 2023 2:07 pm
by chrispitude
Hi Sitrakar,

What I was trying to say is that you can probably use rewrite rules with WebHelp to do what you want in the future when both of those items have been fixed, bu you can't do it today. Both items need to be fixed first - one in the DITA-OT itself, and one in WebHelp.

- Chris

Re: Flattening URL link for my online help

Posted: Mon Apr 10, 2023 5:00 pm
by Sitrakar
Thanks chrispitude for all the information.