Announcement

Collapse
No announcement yet.

pdf-template: Different head on first page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • pdf-template: Different head on first page

    I use a cover page for quotes. Therefore I do want to print the header on the first page.

    Is this possible?

    I have tried it this way:

    ```

    {{#if [pageNumber > 1]}}

    Angebot Nr.: {{number}} / Seite: {pageNumber} von {totalPageNumber}

    {{/if}}​
    ```

    But this the the header is never printed....

  • #2
    Try with ifEqual

    Comment


    • #3
      Originally posted by shalmaxb View Post
      Try with ifEqual
      No, does not work either...

      Comment


      • #4
        I think, you have to write

        {{#ifNotEqual pageNumber 1}} Angebot Nr.: {{number}} / Seite: {pageNumber} {{/ifNotEqual}}

        Comment


        • #5
          Originally posted by shalmaxb View Post
          I think, you have to write

          {{#ifNotEqual pageNumber 1}} Angebot Nr.: {{number}} / Seite: {pageNumber} {{/ifNotEqual}}
          Yes, you are right. But I had just tried if my "if" would change anything. Even with the "ifNotEqual" the header will be printed on all pages..... I feel lost ;=)

          Comment


          • #6
            Did you write the condition in the code or in the WYSIWYG, did you escape the code by HTML comment (<!-- xxxxxx.-->)?

            Comment


            • #7
              Originally posted by shalmaxb View Post
              Did you write the condition in the code or in the WYSIWYG, did you escape the code by HTML comment (<!-- xxxxxx.-->)?
              I have written the condition in the html code but without escaping it by comment. Yet the html-comment doesn't solve the problem either. Now I use this code but header is printed on all pages.

              HTML Code:
              <!--{{#ifNotEqual 1 pageNumber}}-->
              <p align="center"><span style="color: #205629; font-size: 10px;">Angebot Nr.:&nbsp; {{number}} / Seite: {pageNumber}&nbsp;von {totalPageNumber}</span></p>
              <!--{{/ifNotEqual}}-->

              Comment


              • #8
                {{#ifNotEqual 1 pageNumber}}​ must be {{#ifNotEqual pageNumber1}}

                Comment


                • #9
                  Originally posted by shalmaxb View Post
                  {{#ifNotEqual 1 pageNumber}}​ must be {{#ifNotEqual pageNumber1}}
                  I have already tried both version - same behaviour. I have also tried to include the condition within brackets: [pageNumber 1].

                  Comment


                  • #10
                    Did you try to code the numder with ticks? {{#ifNotEqual pageNumber​ '1'}}
                    If that either does not work, I guess, that the system tag pageNumber might need an own custom handler to be used in the template.
                    Last edited by shalmaxb; 12-19-2023, 10:12 PM.

                    Comment


                    • #11
                      It's not possible.

                      Comment


                      • #12
                        As you cannot use the pageNumber Tag, what about to use another field for the condition, which only exists on page 1.

                        Comment


                        • #13
                          It will need having some token that changes its value to true. Not sure whether the helper interface does allow that except an entity attribute will be used as a token which is not elegant.

                          Comment

                          Working...
                          X