Child links in tiles
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 77
- Joined: Tue Nov 14, 2017 8:34 pm
Child links in tiles
Hi,
In the tiles view, the navtitle of the topicref shows up fine. I would like to include some child links inside each tile. Is there a way to do it? I tried using the topicmeta > data tags, but the content in the data tag is not displayed in the output. If a shortdesc is entered, it is correctly displayed.
Thanks...
Syed
In the tiles view, the navtitle of the topicref shows up fine. I would like to include some child links inside each tile. Is there a way to do it? I tried using the topicmeta > data tags, but the content in the data tag is not displayed in the output. If a shortdesc is entered, it is correctly displayed.
Thanks...
Syed
-
- Site Admin
- Posts: 275
- Joined: Thu Dec 24, 2009 11:21 am
Re: Child links in tiles
Hi Syed,
By design the tiles component contains only entries for the first level topics. If you want to customize it in order to display the child topics you have to contribute an XSLT extension file that overrides the built-in template that generates each tile.
You can use the following XSLT snippet as starting point:
You should register your XSLT file on the "com.oxygenxml.webhelp.xsl.createMainPage" extension point in your Publishing Template's descriptor file.
Please note that the above XSLT snippet alters the original structure of the Tiles component and the default CSS styles might not match the new structure. You need to provide your own CSS styles to customize the layout of each tile.
Regards,
Alin
By design the tiles component contains only entries for the first level topics. If you want to customize it in order to display the child topics you have to contribute an XSLT extension file that overrides the built-in template that generates each tile.
You can use the following XSLT snippet as starting point:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0"
xmlns:whc="http://www.oxygenxml.com/webhelp/components"
xmlns:toc="http://www.oxygenxml.com/ns/webhelp/toc"
>
<xsl:template match="toc:topic" mode="create-tiles">
<xsl:param name="tileTemplate"/>
<div class="tile-container">
<xsl:next-match>
<xsl:with-param name="tileTemplate" select="$tileTemplate"/>
</xsl:next-match>
<xsl:apply-templates select="toc:topic" mode="#current">
<xsl:with-param name="tileTemplate" select="$tileTemplate"/>
</xsl:apply-templates>
</div>
</xsl:template>
</xsl:stylesheet>
You should register your XSLT file on the "com.oxygenxml.webhelp.xsl.createMainPage" extension point in your Publishing Template's descriptor file.
Code: Select all
<xslt>
<extension file="xsl/whc-tiles-customization.xsl" id="com.oxygenxml.webhelp.xsl.createMainPage"/>
</xslt>
Regards,
Alin
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
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