add custom js in search pages
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 158
- Joined: Fri Nov 10, 2017 8:16 am
add custom js in search pages
Hi,
I added my customized js files in the .opt files, these js files are not applied to the searching result pages?
How to add custom js in the searching result pages?
Regards,
Catherine
I added my customized js files in the .opt files, these js files are not applied to the searching result pages?
How to add custom js in the searching result pages?
Regards,
Catherine
-
- Site Admin
- Posts: 275
- Joined: Thu Dec 24, 2009 11:21 am
Re: add custom js in search pages
Hello,
The recommended procedure for inserting additional content in your output files is via HTML fragment files and it is described here: https://www.oxygenxml.com/doc/versions/ ... -html.html
There are no specific placeholders for the Search Page. However, there are some general placeholders available for all pages, including the Search Page:
- webhelp.fragment.head - your content will be included in the <head> element of the output page
- webhelp.fragment.before.body - your content will be included after that start tag of the <body> element
- webhelp.fragment.after.body - your content will be included at the end of the <body> element, just before the </body> end tag
If your HTML fragment files reference other resources (like JS in your case) you should make sure that those files are also copied in the output. Here is how: https://www.oxygenxml.com/doc/versions/ ... urces.html
Please note that the path references to the resources mentioned above should be expressed relatively to the Publishing Template's root directory using the ${oxygen-webhelp-template-dir} macro. For example:
Please let me know if you have further questions.
Regards,
Alin
The recommended procedure for inserting additional content in your output files is via HTML fragment files and it is described here: https://www.oxygenxml.com/doc/versions/ ... -html.html
There are no specific placeholders for the Search Page. However, there are some general placeholders available for all pages, including the Search Page:
- webhelp.fragment.head - your content will be included in the <head> element of the output page
- webhelp.fragment.before.body - your content will be included after that start tag of the <body> element
- webhelp.fragment.after.body - your content will be included at the end of the <body> element, just before the </body> end tag
If your HTML fragment files reference other resources (like JS in your case) you should make sure that those files are also copied in the output. Here is how: https://www.oxygenxml.com/doc/versions/ ... urces.html
Please note that the path references to the resources mentioned above should be expressed relatively to the Publishing Template's root directory using the ${oxygen-webhelp-template-dir} macro. For example:
Code: Select all
<html>
<script type="text/javascript" src="${oxygen-webhelp-template-dir}/js/test.js"/>
<link rel="stylesheet" type="text/css" href="${oxygen-webhelp-template-dir}/css/test.css"/>
</html>
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