Referencing an external CSS
Post here questions and problems related to editing and publishing DITA content.
Referencing an external CSS
Referencing an external CSS
I am using Oxygen 20.0, Webhelp Classic.
Imagine this scenario:
Our company makes a product and provides an online manual. The product is then sold by 3 separate companies, who want a "customized" version of the manual with their own branding.
To handle this, I set up a server with 3 different directories. Each directory represents a different company. Each directory contains 3 files: CompanyLogo.png, CompanyCSS.css, and CompanyFavicon.png. So here is the structure of the server:
/
-->Company1
---->CompanyLogo.png
---->CompanyCSS.css
---->CompanyFavicon.png
-->Company2
---->CompanyLogo.png
---->CompanyCSS.css
---->CompanyFavicon.png
-->Company3
---->CompanyLogo.png
---->CompanyCSS.css
---->CompanyFavicon.png
I want to generate the manual ONCE, then upload the output files to each directory and have the logo, css, and favicon take effect.
==Logo==
I can set the webhelp.logo.image parameter to "CompanyLogo.png"; I have tested and verified this works.
==CSS==
What transformation parameter should I use to specify the relative path to the CSS on the server? Because each CompanyCSS.css file is different, I do not want to associate a particular CSS to my transformation scenario; I only want to point to where it will be. I tried both args.css and args.csspath, but neither worked.
==Favicon==
Similar to the CSS above, I do not want to associate a favicon with a transformation scenario, I only want to reference where it will be.
Thanks.
I am using Oxygen 20.0, Webhelp Classic.
Imagine this scenario:
Our company makes a product and provides an online manual. The product is then sold by 3 separate companies, who want a "customized" version of the manual with their own branding.
To handle this, I set up a server with 3 different directories. Each directory represents a different company. Each directory contains 3 files: CompanyLogo.png, CompanyCSS.css, and CompanyFavicon.png. So here is the structure of the server:
/
-->Company1
---->CompanyLogo.png
---->CompanyCSS.css
---->CompanyFavicon.png
-->Company2
---->CompanyLogo.png
---->CompanyCSS.css
---->CompanyFavicon.png
-->Company3
---->CompanyLogo.png
---->CompanyCSS.css
---->CompanyFavicon.png
I want to generate the manual ONCE, then upload the output files to each directory and have the logo, css, and favicon take effect.
==Logo==
I can set the webhelp.logo.image parameter to "CompanyLogo.png"; I have tested and verified this works.
==CSS==
What transformation parameter should I use to specify the relative path to the CSS on the server? Because each CompanyCSS.css file is different, I do not want to associate a particular CSS to my transformation scenario; I only want to point to where it will be. I tried both args.css and args.csspath, but neither worked.
==Favicon==
Similar to the CSS above, I do not want to associate a favicon with a transformation scenario, I only want to reference where it will be.
Thanks.
-
- Posts: 222
- Joined: Tue Jul 01, 2014 11:48 am
Re: Referencing an external CSS
Post by bogdan_cercelaru »
Hello,
You could achieve this using the webhelp.head.script parameter that points to an XML file like the one below:
In this case, the ${oxygen-webhelp-output-dir} macro will be expanded to a path relative to the output directory so that it will point to the file located where the generated output will be copied.
Regards,
Bogdan
You could achieve this using the webhelp.head.script parameter that points to an XML file like the one below:
Code: Select all
<head>
<link rel="stylesheet" type="text/css" href="${oxygen-webhelp-output-dir}/CompanyCSS.css" />
<link rel="icon" href="${oxygen-webhelp-output-dir}/CompanyFavicon.png" type="image/x-icon" />
<link rel="shortcut icon" href="${oxygen-webhelp-output-dir}/CompanyFavicon.png" type="image/x-icon" />
</head>
Code: Select all
CompanyCSS.css
Regards,
Bogdan
Bogdan Cercelaru
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
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