WebHelp - File Refeence links open in target="_blank"

rminaker
Posts: 27

WebHelp - File Refeence links open in target="_blank"

Tue Apr 28, 2015 11:57 pm

Hi,

I have a WebHelp project with Word, Excel and PDF files reference links. I'd like them all to open in target="_blank" when output to WebHelp (so as to avoid getting a blank page in the WebHelp); however, only the PDF file references seem to do this by default. Is there a way to force .docx and .xlsx to do this as well?

For example, I get this code when both document links areinserted the exact same way.

<a class="xref" href="file1.pdf" target="_blank">file 1</a>
<a class="xref" href="file2.docx">file2</a>

Thanks!

R.
sorin_ristache
Posts: 4144

Re: WebHelp - File Refeence links open in target="_blank"

Tue May 05, 2015 6:43 pm

Hi,

It is a DITA-OT issue. You have to declare your file types (.docx, .xlsx, etc) as binary resource file types in DITA-OT by extending the dita.resource.extensions DITA-OT point, by adding a custom plugin. The .pdf file type is already is declared as a binary file type in DITA-OT, this is why the target="_blank" attribute is added. As an example you can see how the .pdf extension is decalred in the file:

DITA-OT/plugins/org.dita.base/plugin.xml
Regards,
Sorin

<oXygen/> XML Editor Support

Return to “DITA (Editing and Publishing DITA Content)”

Who is online

Users browsing this forum: Bing [Bot] and 2 guests