ImageMap target options
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 1
- Joined: Wed Feb 24, 2021 11:44 pm
ImageMap target options
Post by SebastienP »
I'm trying to do something that I think I may not yet have the skills to achieve, as a relatively new user of DITA.
I'm working with an image map, and I'm trying to change how the links open. Getting the image map to work was not at all a problem, but I'm trying to get the links to open by means other than just opening that page. Is there a way to force opening the links either specifically in the same tab, a new tab, a new window, a dialogue or other hovering window, that sort of thing?
I know browsers can override these options, but I'm using the image map as a substitute for an index for a software platform where users are unlikely to have training, and I want for that tab/window to stay open while they look up reference info in (ideally) another window, or possibly a tab. Having the main page persist without having to click "Back" would help reduce confusion in people who are probably competent but are probably uninvested in learning.
Usually I would fiddle about with a "target=" tag, but oXygen seems to reject this as DITA invalid.
Thanks!
I'm working with an image map, and I'm trying to change how the links open. Getting the image map to work was not at all a problem, but I'm trying to get the links to open by means other than just opening that page. Is there a way to force opening the links either specifically in the same tab, a new tab, a new window, a dialogue or other hovering window, that sort of thing?
I know browsers can override these options, but I'm using the image map as a substitute for an index for a software platform where users are unlikely to have training, and I want for that tab/window to stay open while they look up reference info in (ideally) another window, or possibly a tab. Having the main page persist without having to click "Back" would help reduce confusion in people who are probably competent but are probably uninvested in learning.
Usually I would fiddle about with a "target=" tag, but oXygen seems to reject this as DITA invalid.
Thanks!
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: ImageMap target options
Hello,
I'm following this up just to update the thread.
By default, all links associated with an an image map open in the same page.
However, as a colleague already replied to you on the email support., we have a publishing template customization, which allows you to open those image map links in a separate page.
More specific, you can use an XSLT Extension that sets the target="_blank" attribute for all links generated from <xref> elements inside an imagemap.
Then, you have to register your XSLT file on the com.oxygenxml.webhelp.xsl.dita2webhelp extension point.
You can use the following Publishing Template as an example: https://github.com/oxygenxml/oxygen-pub ... rget-blank
Maybe you could use this customization as a starting point for the customization you intend to perform.
Regards,
Costin
I'm following this up just to update the thread.
By default, all links associated with an an image map open in the same page.
However, as a colleague already replied to you on the email support., we have a publishing template customization, which allows you to open those image map links in a separate page.
More specific, you can use an XSLT Extension that sets the target="_blank" attribute for all links generated from <xref> elements inside an imagemap.
Code: Select all
<xsl:template match="*[contains(@class, ' topic/xref ')]" mode="imagemap-xref">
<xsl:next-match/>
<xsl:attribute name="target">_blank</xsl:attribute>
</xsl:template>
You can use the following Publishing Template as an example: https://github.com/oxygenxml/oxygen-pub ... rget-blank
Maybe you could use this customization as a starting point for the customization you intend to perform.
Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service