Webhelp Responsive Fragments - Access Transformation scenario parameters
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 167
- Joined: Tue Mar 06, 2018 1:34 am
Webhelp Responsive Fragments - Access Transformation scenario parameters
I was reading about how the Webhelp Responsive fragments can use web macros, here:
https://www.oxygenxml.com/doc/versions/ ... =timestamp
I'd like to put some javascript into the fragment HTML pages that has different behavior based on the "default.language" transformation scenario parameter?
I was able to access that in the past in the XSLT files using $DEFAULTLANG. How do I access that parameter in the responsive fragments?
https://www.oxygenxml.com/doc/versions/ ... =timestamp
I'd like to put some javascript into the fragment HTML pages that has different behavior based on the "default.language" transformation scenario parameter?
I was able to access that in the past in the XSLT files using $DEFAULTLANG. How do I access that parameter in the responsive fragments?
-
- Posts: 407
- Joined: Mon Dec 05, 2011 6:08 pm
Re: Webhelp Responsive Fragments - Access Transformation scenario parameters
Hi,
You can achieve this by using the param macro. The XHTML fragment may be something like this:
Regards,
Ionela
You can achieve this by using the param macro. The XHTML fragment may be something like this:
Code: Select all
<script type="text/javascript" xmlns:whc="http://www.oxygenxml.com/webhelp/components">
var language = '<whc:macro value="${param(default.language)}"/>';
console.log("The default language is:", language);
</script>
Ionela
Ionela Istodor
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