Webhelp responsive template - customize header
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 22
- Joined: Wed May 29, 2019 5:43 pm
Webhelp responsive template - customize header
Hi again,
I would like to do a simple customisation to the Webhelp Responsive template, but I'm struggling to locate the right resources (XSL files, xml templates...?).
I would like to replace the publication title link on the top left corner by an image, without text. (Home icon basically)... I've tried with CSS, where I manage to place an image in the right position, and push the text out of sight, but the link is not working on the image... Had a look on the XSL transformation too (inspired by this page: https://www.oxygenxml.com/doc/versions/ ... mport.html), but I cannot find what to modify in order to customize this part of the header (in the header.xml template)
Any help would be greatly appreciated!
Thanks
David
I would like to do a simple customisation to the Webhelp Responsive template, but I'm struggling to locate the right resources (XSL files, xml templates...?).
I would like to replace the publication title link on the top left corner by an image, without text. (Home icon basically)... I've tried with CSS, where I manage to place an image in the right position, and push the text out of sight, but the link is not working on the image... Had a look on the XSL transformation too (inspired by this page: https://www.oxygenxml.com/doc/versions/ ... mport.html), but I cannot find what to modify in order to customize this part of the header (in the header.xml template)
Code: Select all
<whc:webhelp_publication_title/>
Thanks
David
-
- Posts: 12
- Joined: Wed Jun 05, 2019 10:39 am
- Location: Germany
Re: Webhelp responsive template - customize header
Hi David,
That's quite simple.
Just place the element within (in header.xml).
Set the parameter (in your Template Descriptor File, *.opt).
Alternatively, you can also add your link + image to manually.
In order to remove the Publication Title just comment out or remove the element.
I hope this helps you.
Best regards,
Anton
That's quite simple.
Just place the
Code: Select all
<whc:webhelp_logo/>
Code: Select all
<div class="wh_logo_and_publication_title">
Set the parameter
Code: Select all
<parameter name="webhelp.logo.image" value="[color=#BF0000]YOUR FILEPATH[/color]"/>
Alternatively, you can also add your link + image to
Code: Select all
<div class="wh_logo_and_publication_title">
In order to remove the Publication Title just comment out or remove the
Code: Select all
<whc:webhelp_publication_title/>
I hope this helps you.
Best regards,
Anton
-
- Posts: 22
- Joined: Wed May 29, 2019 5:43 pm
Re: Webhelp responsive template - customize header
Hi Anton!
Thanks for your reply, but I still have a problem with these solutions...
I already tried the first one by setting the parameters in the DITA transformation "parameters" tab, using also webhelp.logo.image.alt and webhelp.logo.image.target.url, but the problem is that it always points the same target that you define here (in my case: index.html), no matter where you are in the WebHelp hierarchy. So this works when you are at the root folder, but is broken as soon as you navigate in a subfolder (topic, task, whatever...).
The problem is the same if I change include my HTML block directly in the header.xml template, as long as I define the link target in a "static" way. the target should be different depending on where the page is located in the folder architecture...
Any idea on how to solve this?
Best regards
David
Thanks for your reply, but I still have a problem with these solutions...
I already tried the first one by setting the parameters in the DITA transformation "parameters" tab, using also webhelp.logo.image.alt and webhelp.logo.image.target.url, but the problem is that it always points the same target that you define here (in my case: index.html), no matter where you are in the WebHelp hierarchy. So this works when you are at the root folder, but is broken as soon as you navigate in a subfolder (topic, task, whatever...).
The problem is the same if I change include my HTML block directly in the header.xml template, as long as I define the link target in a "static" way. the target should be different depending on where the page is located in the folder architecture...
Any idea on how to solve this?
Best regards
David
-
- Posts: 12
- Joined: Wed Jun 05, 2019 10:39 am
- Location: Germany
Re: Webhelp responsive template - customize header
Hi David,
Okay, this can be achieved with the help of a WebHelp macro. You can use as your href attribute value to make the link to your index page work from every subpage.
For more information on WebHelp macros (they are very helpful!), see https://www.oxygenxml.com/doc/versions/ ... gment_file.
Does this solve your problem?
Best regards,
Anton
Okay, this can be achieved with the help of a WebHelp macro. You can use
Code: Select all
${path(oxygen-webhelp-output-dir)}/index.html
For more information on WebHelp macros (they are very helpful!), see https://www.oxygenxml.com/doc/versions/ ... gment_file.
Does this solve your problem?
Best regards,
Anton
-
- Posts: 86
- Joined: Sun May 03, 2015 7:34 pm
- Location: San Francisco
Re: Webhelp responsive template - customize header
Post by urbanrobots »
Hello~ I have a similar question. Is there an extension point for overriding the whc:webhelp_publication_title template in the commonComponentExpander.xsl file? I don't want to edit the file directly but want to override just this template so that we can use ditamap metadata instead of the maptitle for the publication title.
Thanks!
Thanks!
-
- Posts: 846
- Joined: Mon Dec 05, 2011 6:04 pm
Re: Webhelp responsive template - customize header
Hi urbanrobots,
If you need override the templates from the "commonComponentExpander.xsl" file, you should register your own XSL on all of the four extension points enumerated below:
com.oxygenxml.webhelp.xsl.dita2webhelp, com.oxygenxml.webhelp.xsl.createMainPage, com.oxygenxml.webhelp.xsl.createSearchPage and com.oxygenxml.webhelp.xsl.createIndextermsPage.
You can see details on the XSLT Extension Points in the WebHelp Responsive XSLT-Import and XSLT-Parameter Extension Points section from the WebHelp Responsive User-Guide.
Also, you can find an example of using XSLT extension points from a publishing template in this section.
Regards,
Costin
If you need override the templates from the "commonComponentExpander.xsl" file, you should register your own XSL on all of the four extension points enumerated below:
com.oxygenxml.webhelp.xsl.dita2webhelp, com.oxygenxml.webhelp.xsl.createMainPage, com.oxygenxml.webhelp.xsl.createSearchPage and com.oxygenxml.webhelp.xsl.createIndextermsPage.
You can see details on the XSLT Extension Points in the WebHelp Responsive XSLT-Import and XSLT-Parameter Extension Points section from the WebHelp Responsive User-Guide.
Also, you can find an example of using XSLT extension points from a publishing template in this section.
Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
oXygen XML Editor and Author Support
-
- Posts: 86
- Joined: Sun May 03, 2015 7:34 pm
- Location: San Francisco
Re: Webhelp responsive template - customize header
Post by urbanrobots »
Thank you, Corin! That's just what I needed.
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