Skip to main content
Almtuna
Inspiring
December 7, 2022
Question

Header with conditional text?

  • December 7, 2022
  • 1 reply
  • 314 views

In my FM documents I have the regular Heading1 paragraph style. In the page header, even pages have the most recent Heading1 displayed.

I've also created a copy of Heading1, called Heading1new_html_page, to get a new html page when generating responsive html5. (Some chapters are too big for one html page.)

The problem is that I still get the most recent Heading1 in the page header, even if there's a more recent Heading1new_html_page.

 

For example, if I have the following headings in my FM file:

"Aaa" (Heading1)

"Bbb" (Heading1new_html_page)

"Ccc" (Heading1new_html_page)

 

Now I get the "Aaa" in every page header, but I also want "Bbb" and "Ccc" when those headings are the most recent.

    This topic has been closed for replies.

    1 reply

    Community Expert
    December 7, 2022

    Hi Almtuna,

     

    What is the definition of your system variable?

    I assume something like: <$paratext[Heading1,Headin1new_html_page]>

    FrameMaker will find the first paragraph format Heading1 and display its text in the header.

    It will not search for other paragraph formats.

    You can add a + at the end of the variable definition before the >. Then FrameMaker will display the text of the last paragraph on this page.

    When you add a + at the end of each of each paragraph format, FrameMaker will show the last one on this page.

    Please try this out and let us know, if this helps in your case.

     

    Best regards

     

    Winfried

    Almtuna
    AlmtunaAuthor
    Inspiring
    December 7, 2022

    With <$paratext[Heading1,Heading1_new_html_page]+>

    I get the following in the header:

    +>

     

    (Just in case I moved the + sign a step to the left, i.e. <$paratext[Heading1,Heading1_new_html_page+]>, but I got no output at all.)

     

    Community Expert
    December 7, 2022

    I had made a test before, but obviously I made a mistake.

    I had thought that this would work:

    <$paratext[Heading1+,Heading1_new_html_page+]>

    However, with this definition the variable will be empty.

    With this only the first heading is listed:

    <$paratext[Heading1,Heading1_new_html_page+]>

    With this defnition the text of the last paragraph format is listed:

    <$paratext[Heading1+,Heading1_new_html_page]>

    You will have to test, what works for you.