2 Replies Latest reply on Sep 10, 2013 10:40 AM by robikshrestha

    Display different header in the first page


      I am displaying a table in the header (not an MS word header but header identified as something above <?start:body?> tag) of an rtf template. That table has 3 rows, I need to display one of those rows only in the first page and not in other pages.

      I did not find any method on querying for the page number. So, I used a flag in the following manner: (Here, text with red color denotes RTF field). The following is what my RTF file looks like:


      Header 1Header 2Header 3
      init_fieldThis is the row to be shown on all the pages
      if_fieldThis row should only be shown on the first page.end_if change_variable


      other stuff

      <?end body?>





      <?if: (xdoxslt:get_variable($_XDOCTX,'FLAG')!='NONFIRST')?><?xdoxslt:set_variable($_XDOCTX,'FLAG','FIRST')?><?end if?>



      <?if: (xdoxslt:get_variable($_XDOCTX,'FLAG'))='FIRST'?>



      <?end if?>





      BUT, I still see all the rows in all the pages. It seems like the value of variable 'FLAG' is not preserved between different pages. To me, it seems like, header is generated once and same header is used in all the pages