Content to be published in Cover page and Rest of the document

Post here questions and problems related to editing and publishing DITA content.
sure4369
Posts: 6
Joined: Tue Dec 13, 2022 2:25 pm

Content to be published in Cover page and Rest of the document

Post by sure4369 »

Hi,

I want this to be published in the footer of my cover page and only date & version to be published in the footer of the rest of the document.
image.png
image.png (4.13 KiB) Viewed 519 times
Please provide resolution for this. I am using "DITA Map PDF - based on HTML5 & CSS" scenario.

Thanks
Sure
julien_lacour
Posts: 498
Joined: Wed Oct 16, 2019 3:47 pm

Re: Content to be published in Cover page and Rest of the document

Post by julien_lacour »

Hello,

You need to override the front-page built-in CSS rules and create a multi-line content.

Code: Select all

@page front-page {
  @bottom-right {
    content: "Doc No.-101 \A Version A.1 \A December 2022";
  }
}
For the other pages, you will need to override the chapter page definition:

Code: Select all

@page chapter:first:left, chapter:left{
  @bottom-right {
    content: "Version A.1 \A December 2022";
  }
}
@page chapter:first:right, chapter:right{
  @bottom-right {
    content: "Version A.1 \A December 2022";
  }
}
Regards,
Julien
sure4369
Posts: 6
Joined: Tue Dec 13, 2022 2:25 pm

Re: Content to be published in Cover page and Rest of the document

Post by sure4369 »

Hi Julien,

Thanks for your reply.

This is just static content and it seems we need to update CSS for every release for date and version. How to put dynamic content here which will change from release to release without changing CSS.

Thanks
Surendra
julien_lacour
Posts: 498
Joined: Wed Oct 16, 2019 3:47 pm

Re: Content to be published in Cover page and Rest of the document

Post by julien_lacour »

Hello,

It is of course possible to show dynamic content in the page headings. You can add metadata in your DITA content and gather it with the oxy_xpath() function. See How to Show Metadata in the Header or Footer from our user-guide for more information.

You can also find other examples in the How to Show Metadata in the Cover Page topic.

Regards,
Julien
Post Reply