We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 13226
    • 953 Posts
    Hmmmmmmmm, all looks correct to me sad

    I must admit, I can't help further.

    May sound strange - try duplicating the TV "files", renaming it and calling it instead

    Or temporarily remove the call that works and then test it, which would show if a conflict happens between the calls.

    If it works you know there is a conflict - but I wouldn't know how to get rid of it, which isn't a help.

    Just a tip:

    I would change:
    <section id="rotator" style="background-image: url(/images/innerHeader1.jpg);">

    To either of the following
    <section id="rotator" style="background-image:url([(base_url)]images/innerHeader1.jpg);">
    <section id="rotator" style="background-image:url([(site_url)]images/innerHeader1.jpg);">
      • 49771
      • 16 Posts
      @iusemodx,
      your right, I totally missed that.

      I'm limited in Evo experience. But based on the documentation of the IF snippet. I'm assuming this call would work.

      [[if? &is=`[*files*]:!empty` &then=`<h2>Product Downloads</h2>`]]


      if you were to use PHX

      [+phx:if=`[*files*]`:ne=``:then=`<h2>Product Downloads</h2>`+]


      I would also troubleshoot, and call the template variable within the content to make sure that the TV is actually empty. [ed. note: brandonhim last edited this post 9 years, 2 months ago.]
        • 13226
        • 953 Posts
        @brandonhim

        Ive just looked at the IF docs, I am not a PHPr, can you explain what the difference is between:

        isempty, empty, !empty

        This will possibly give the AHA effect if we knew the difference.

        Thanks for your time
          • 13226
          • 953 Posts
          @brandonhim

          Please correct me here if I am wrong.

          "!empty" or "notempty" or "not_empty" or "isnotempty" => Not Empty - True / False
          "isempty" or "empty" => Empty - True / False

          So your call:
          [[if? &is=`[*files*]:!empty` &then=`<h2>Product Downloads</h2>`]]

          Says if the TV is not empty output the H2 code - which isn't what is required

          I presume the correct call can be one of the following:
          [[if? &is=`[*files*]:isempty` &then=`` &else=`<h2>Product Downloads</h2>`]]
          [[if? &is=`[*files*]:empty` &then=`` &else=`<h2>Product Downloads</h2>`]]


          @brandonhim

          My bad - this is one of the reasons I never took to PHP.

          The logic behind using your call is the same as using "isempty" or "empty", as the output is the same.

          If the TV is empty "do nothing", which means it "has something in it" so output the H2

          In short form, if the TV is "not empty" output the H2

          So, was a long day and I have an early start, so signing out smiley [ed. note: iusemodx last edited this post 9 years, 2 months ago.]
            • 49771
            • 16 Posts
            @iusemodx

            They are just different ways for the snippet to determine which operator to use to check the value.
            In this snippet, they both are checking if the variable is empty but one returns true and the other returns false.

            So you can use either operator
            (isempty, empty) = if the value is EMPTY

            (!empty, notempty) = if the value is NOT EMPTY

            I hope that answers your question.
              • 13226
              • 953 Posts
              Post reply just crossed smiley

              Just modified my last post as I ran through the logic of the call.
                • 49771
                • 16 Posts
                Quote from: iusemodx at Feb 27, 2015, 10:15 PM
                @brandonhim

                Please correct me here if I am wrong.

                "!empty" or "notempty" or "not_empty" or "isnotempty" => Not Empty - True / False
                "isempty" or "empty" => Empty - True / False

                So your call:
                [[if? &is=`[*files*]:!empty` &then=`<h2>Product Downloads</h2>`]]

                Says if the TV is not empty output the H2 code - which isn't what is required

                I presume the correct call can be one of the following:
                [[if? &is=`[*files*]:isempty` &then=`` &else=`<h2>Product Downloads</h2>`]]
                [[if? &is=`[*files*]:empty` &then=`` &else=`<h2>Product Downloads</h2>`]]


                @brandonhim

                My bad - this is one of the reasons I never took to PHP.

                The logic behind using your call is the same as using "isempty" or "empty", as the output is the same.

                If the TV is empty "do nothing", which means it "has something in it" so output the H2

                In short form, if the TV is "not empty" output the H2

                So, was a long day and I have an early start, so signing out smiley

                Haha, yes pretty much. I figured there would be less issues with a call that uses less parameters. So yes it pretty much is saying...

                If [*files*] is not empty then output the H2 Code.
                versus..
                If [*files*] is empty, then output nothing, but if it isn't empty output the H2 Code.
                  • 13226
                  • 953 Posts
                  @formulax

                  I didn't mean to hijack your post, but doing so has opened Pandoras box.

                  You now have the choice or can test with the following:

                  [[if? &is=`[*files*]:!empty` &then=`<h2>Product Downloads</h2>`]]
                  [[multiTV? &tvName=`files`]]
                  
                  [[if? &is=`[*files*]:empty` &then=`` &else=`<h2>Product Downloads</h2>`]]
                  [[multiTV? &tvName=`files`]]
                  
                  [[if? &is=`[*files*]:isempty` &then=`` &else=`<h2>Product Downloads</h2>`]]
                  [[multiTV? &tvName=`files`]]


                  Gone for the night, hope one of the calls works.
                  • discuss.answer
                    You have two possibilities:

                    I prefer the first one in most cases.
                      • 49312
                      • 61 Posts
                      Quote from: Jako at Feb 27, 2015, 10:52 PM
                      You have two possibilities:

                      I prefer the first one in most cases.

                      Jako! You are my hero, for today anyway smiley One of those hang my head moments why I never thought to just include those as part of the outerTpl. All is working as expected now. Thank you to everyone who offer suggestions.