Skip to main content
May 14, 2014
Answered

Using bookTitleTpl.fml for PDF: How do I populate a version variable?

  • May 14, 2014
  • 1 reply
  • 517 views

FM 11

DITA: 1.2

OS: Windows 7

We save our ditamap/xml documents as "Book 11 with fm components (*.book)" to create .fm files from the .xml using the ouputTemplates in the C:\Program Files (x86)\Adobe\AdobeFrameMaker11\Structure\xml\DITA\outputTemplates directory. I modified the original template files that we need, using the original's variable (Chapter Title Name <$chaptertitlename> for populating the title in the bookTitletpl.fm template file. This works great--whichever document I'm publishing, the correct title appears in that variable.

  • I'd like to do the same (using a variable) for Version number, but I can't figure out how to do that using a user/system variable and/or even by using some other means (ditaval file, etc.). So far I cannot find an easy/clear answer here, but I'd like to use a variable if I can.

  • The <$chaptertitlename> for the title seems to be pulling the name entered in our title element for the ditamap for each document. It there a system variable that will pull from some other element? Perhaps even something like the "rev" metadata for the map element for the document?

The template book cover page looks like this:

Logo (hard coded)

bookTitleTpl.fm (variable)

Version 2.0 (hard coded)

Thanks for any suggestions!

This topic has been closed for replies.
Correct answer ScottPrentice

I don't think you'll be able to do this without some custom scripting. I don't think that the default book build process provides for the ability to pull in content from other map elements .. just the title. You could write some ExtendScript code to process the book after the initial build to add/update variables based on map metadata.


DITA-FMx does provide this feature. The book build process will import any map element or attribute into a variable.


Cheers,


scott

1 reply

ScottPrentice
ScottPrenticeCorrect answer
Inspiring
May 14, 2014

I don't think you'll be able to do this without some custom scripting. I don't think that the default book build process provides for the ability to pull in content from other map elements .. just the title. You could write some ExtendScript code to process the book after the initial build to add/update variables based on map metadata.


DITA-FMx does provide this feature. The book build process will import any map element or attribute into a variable.


Cheers,


scott

May 14, 2014

Thanks, Scott. I had a feeling that scripting was the answer, but I wanted to be thorough before going there. We don't have DITA-FMx, unfortunately, but it does sound like a great plug-in. I'll try and script for our solution for now. Thanks!

Diana