Page 1 of 1

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

Posted: Tue Apr 28, 2015 11:57 pm
by rminaker
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.

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

Posted: Tue May 05, 2015 6:43 pm
by sorin_ristache
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