Announcement

Collapse
No announcement yet.

more conditions

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

    more conditions

    I'd like to be able to add a condition for

    "contains"

    "starts with"

    #2
    Late tonight Jo ?

    When i sore the title i thought you were asking for more tabs under the Terms and conditions - should have known it would be a design thing

    Comment


      #3
      content categories will be your saviour!

      Comment


        #4
        Yep its late....

        My current resolution is to stop work before 8pm- but i relinquished control over Surf-wax so I can only get hold of it for design updates out of hours! I wonder somedays who is the boss?

        Comment


          #5
          The Boss - Always the ones that get weekends off

          Comment


            #6
            Weekends- there's a joke!!

            I just settle for jan, feb and march off

            should have known it would be a design thing
            thats all I'm good for, colouring in pretty pictures

            One final upload then I'm off

            Comment


              #7
              Originally posted by pinbrook

              thats all I'm good for, colouring in pretty pictures
              someone's gotta do it
              I can barely draw a stickman...that translates into design of any kind

              (I can, however, write music...so I do have *some* creativity lol)
              Tracey

              Comment


                #8
                I would like an 'else' to go with 'blockif'. It's a pain to have to configure the inverse blockif two times.

                Comment


                  #9
                  I would like an 'else' to go with 'blockif'.
                  Yes me to ...

                  Comment


                    #10
                    Me too, nice one Duncan. We constantly have to use more conditions than needed. The blockifs are fantastic though so not a complaint, just a recommendation for the future.

                    Comment


                      #11
                      I have passed on all the requests to the development team.

                      Kind regards,
                      Bruce King
                      SellerDeck

                      Comment


                        #12
                        Originally posted by pinbrook
                        I'd like to be able to add a condition for

                        "contains"

                        "starts with"
                        The conditions are evaluated by the built in PHP engine. It was the primary reason of the integration not the fancy PHP blocks what is basicaly a side product. :-) It means that you can use any PHP functions in the conditions. Therefore both of the requested conditions can be done easily. There are a few PHP functions which can be used here. The below examples are using stripos for case sensitive comparison. You can also use strpos for non case sensitive and some other functions like strstr and stristr. See PHP documentation for more.

                        Code:
                        <actinic:block if="false%20%21%3d%3d%20stripos%28%3cactinic%3avariable%20name%3d%22ProductDescription%22%20%2f%3e,%20%22love%22%29">
                        	<b>Lovely product (contains love).</b><br/>
                        </actinic:block>
                        <actinic:block if="0%20%3d%3d%3d%20stripos%28%3cactinic%3avariable%20name%3d%22ProductDescription%22%20%2f%3e,%20%22Jane%22%29" >
                        	<b>Written by a Jane (starts with Jane).</b><br/>
                        </actinic:block>
                        I would like an 'else' to go with 'blockif'. It's a pain to have to configure the inverse blockif two times.
                        There were lot of discussions on it during v8 and Express development. In v8 we are using our own parser but in Express we are using a standard XML parser to process the markup. Due to strategical reasons we wanted to sitck with standard XML syntax which ruled out the else statement.
                        Zoltan
                        Actinic Software
                        www.actinic.co.uk

                        Comment


                          #13
                          Originally posted by zmagyar
                          <actinic:block if="false%20%21%3d%3d%20stripos%28%3cactinic%3avariable%20name%3d%22ProductDescription%22%20%2f%3e,%20%22love%22%29">
                          <b>Lovely product (contains love).</b><br/>
                          </actinic:block>
                          <actinic:block if="0%20%3d%3d%3d%20stripos%28%3cactinic%3avariable%20name%3d%22ProductDescription%22%20%2f%3e,%20%22Jane%22%29" >
                          <b>Written by a Jane (starts with Jane).</b><br/>
                          </actinic:block>
                          I just tried pasting the above into a product layout, the ! coding error lit up and nothing happened when I tried adding "love" or "Jane" to the product description.

                          How is it meant to be applied?

                          Thanks!

                          Comment


                            #14
                            I'll make sure there's more documentation about this in the help soon. In the meantime, I'll ask Zoltan to come back and check the coding.

                            Comment


                              #15
                              Apologies. Accidentally I have used functions here which are supported in PHP 5 only. But you can find functions available in PHP 4 (which is the PHP version used by v8) to work around the problem. E.g. the following code is working in v8
                              Code:
                              <actinic:block if="false%20%21%3d%3d%20stristr%28%3cactinic%3avariable%20name%3d%22ProductDescription%22%20%2f%3e,%20%22love%22%29" >
                              	<br/><b>Lovely product (contains love).</b><br/>
                              </actinic:block>
                              <actinic:block if="0%20%3d%3d%3d%20strpos%28%3cactinic%3avariable%20name%3d%22ProductDescription%22%20%2f%3e,%20%22Jane%22%29" >
                              	<br/><b>Written by a Jane (starts with Jane).</b><br/>
                              </actinic:block>
                              Please note the latter condition is not case insensitive.
                              Zoltan
                              Actinic Software
                              www.actinic.co.uk

                              Comment

                              Working...
                              X