Selectable footer text for pdf
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 37
- Joined: Tue Apr 13, 2021 9:48 pm
Selectable footer text for pdf
Post by Jeff_Reynolds »
Hi folks,
Might be getting too fancy here, but is there a way I can select footer text at build time when using Publishing templates?
Instead of hardcoding footer text could I inject it by selecting a parameter at build time?
Something like:
Edit a transformation scenario
1. Select a scenario
2. Select a security level, pick from Public, Internal only, Confidential.
3. Let'er rip.
Might be getting too fancy here, but is there a way I can select footer text at build time when using Publishing templates?
Instead of hardcoding footer text could I inject it by selecting a parameter at build time?
Something like:
Edit a transformation scenario
1. Select a scenario
2. Select a security level, pick from Public, Internal only, Confidential.
3. Let'er rip.
-
- Posts: 667
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Selectable footer text for pdf
Post by julien_lacour »
Hello Jeff,
Sure you can, for example with the following CSS:
And then by declaring the 'args.css.param.security-level' in the publishing template file:
Regards,
Julien
Sure you can, for example with the following CSS:
Code: Select all
/* args.css.param.security-level */
:root[security-level='public'] {
string-set: security-level "Public";
}
:root[security-level='internal'] {
string-set: security-level "Internal only";
}
:root[security-level='confidential'] {
string-set: security-level "Confidential";
}
@page chapter:first:left, chapter:first:right , chapter:left, chapter:right{
@bottom-center {
content: string(security-level);
}
}
Code: Select all
<parameters>
<parameter name="args.css.param.security-level" value="confidential"/>
</parameters>
Julien
-
- Posts: 667
- Joined: Wed Oct 16, 2019 3:47 pm
Re: Selectable footer text for pdf
Post by julien_lacour »
Another solution is to use an XPath expression with the value to be displayed in the PDF:
In this case the CSS rule should be the following:
Regards,
Julien
Code: Select all
<bookmeta>
<data name="security-level" value="Internal only"/>
</bookmeta>
Code: Select all
:root {
string-set: security-level oxy_xpath("//*[contains(@class, 'bookmap/bookmeta')]//*[contains(@class, 'topic/data')][@name='security-level']/@value");
}
@page chapter:first:left, chapter:first:right , chapter:left, chapter:right{
@bottom-center {
content: string(security-level);
}
}
Julien
-
- Posts: 37
- Joined: Tue Apr 13, 2021 9:48 pm
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