Title page dates for OOB publishing template
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 37
- Joined: Tue Apr 13, 2021 9:48 pm
Title page dates for OOB publishing template
Post by Jeff_Reynolds »
Hello!
I am using the Ashes publishing template with great results! Thank you!
I have one question: how do I gracefully inject additional content (like a date, mm/yy) onto the title page? Anytime I try to define content I seems to overwrite the title inherit from the ditamap.
Cheers!
I am using the Ashes publishing template with great results! Thank you!
I have one question: how do I gracefully inject additional content (like a date, mm/yy) onto the title page? Anytime I try to define content I seems to overwrite the title inherit from the ditamap.
Cheers!
-
- Site Admin
- Posts: 275
- Joined: Thu Dec 24, 2009 11:21 am
Re: Title page dates for OOB publishing template
Hello,
You can use an XSLT Extension (https://www.oxygenxml.com/doc/versions/ ... mport.html) in your Publishing Template to generate the additional content.
You can use the following sample as inspiration: https://github.com/oxygenxml/oxygen-pub ... e-in-title
Here is how the output would look like:

Regards,
Alin
You can use an XSLT Extension (https://www.oxygenxml.com/doc/versions/ ... mport.html) in your Publishing Template to generate the additional content.
You can use the following sample as inspiration: https://github.com/oxygenxml/oxygen-pub ... e-in-title
Here is how the output would look like:

Regards,
Alin
Alin Balasa
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
Software Developer
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 37
- Joined: Tue Apr 13, 2021 9:48 pm
Re: Title page dates for OOB publishing template
Post by Jeff_Reynolds »
Hello!
Thanks for your quick reply!
I did not mention I was generating pdf, and I require changes to place a date on the title page of a pdf title page. Adding a content declaration seems to overwrite the inherited title.
My current page looks like:
Any help you could provide would be greatly appreciated.
Thanks!
Thanks for your quick reply!
I did not mention I was generating pdf, and I require changes to place a date on the title page of a pdf title page. Adding a content declaration seems to overwrite the inherited title.
My current page looks like:
Code: Select all
*[class ~= "front-page/front-page-title"] {
font-size: 36pt;
line-height: 1.5em;
font-family: "Montserrat", sans-serif;
color: #FFFFFF !important;
}
/* Stephen tries to add date to cover page in PDF but did not work.
front-page-title:after(1) {
content: "May 2021";
margin-top: 125px;
vertical-align: baseline;
text-transform: none;
display: block;
color: #00243e;
font-size: 14pt;
font-family: "Montserrat";
font-weight: 500;
line-height: 1.0;
text-align: left;
}
*/
Thanks!
-
- Posts: 501
- Joined: Mon Feb 03, 2003 10:56 am
Re: Title page dates for OOB publishing template
There are examples in this topic from the documentation, I think they match your use-case:
https://www.oxygenxml.com/doc/versions/ ... aid-title6
I changed a bit your example, I used the class selector, not the element selector, and I used instead of a static content, the current date with a special format:
It appears fine, with the date under the title, at the left side of the page. If it does not wor you when you add this rule to the CSS, try using an :after with a higher rank, like :after(5)..
For date formatting see: https://www.w3.org/TR/xslt20/#format-date
Many regards,
Dan
https://www.oxygenxml.com/doc/versions/ ... aid-title6
I changed a bit your example, I used the class selector, not the element selector, and I used instead of a static content, the current date with a special format:
Code: Select all
*[class ~= "front-page/front-page-title"]:after(1) {
content: oxy_xpath("format-dateTime(current-dateTime(), '[h1]:[m01] [P] on [MNn] [D].')");
margin-top: 125px;
vertical-align: baseline;
text-transform: none;
display: block;
color: #00243e;
font-size: 14pt;
font-family: "Montserrat";
font-weight: 500;
line-height: 1.0;
text-align: left;
}
For date formatting see: https://www.w3.org/TR/xslt20/#format-date
Many regards,
Dan
-
- 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