Announcement

Collapse
No announcement yet.

V9. BlockIf's. And losing marbles.

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

    V9. BlockIf's. And losing marbles.

    I got a little bit of help with this earlier in the year from some very nice people. Now I'm pushing my luck by asking for a bit of help with this blockif.

    For some bizarre reason, it's not working. I can't recall the number of times I've heard somebody say that on the forum, but this time I really mean it. Lol.

    On the main live site, I have the following:

    Code:
    <actinic:block if="%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%22Shopping%20Cart%22%20OR%20%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%22Checkout%20Page%200%22%20OR%20%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%22Checkout%20Page%201%22%20OR%20%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%22Checkout%20Page%202%22%20OR%20%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%22Checkout%20Page%203%22">
    	         <div class="block">
                <h2>First Title</h2>
                		<p>Here's some content...</p>
                <div class="footer"></div>
             </div>
             
    
             <div class="block">
                <h2>Some Title</h2>
                		<p>Blah blah, some content</p>
                <div class="footer"></div>
             </div>
             </actinic:block>
    This code did work. Seriously, it did. What it should do is eliminate a couple of <div>'s I have in the sidebar, to effectively make the SSL pages load a tiny bit quicker.

    The content of the <div>'s should appear if the blockif doesn't read as, in short:

    If PageType is not equal to Shopping Cart OR Checkout Page 0 OR 1 OR 2 OR 3

    Then the <div>'s should be shown. If the page is one of those above, then the <div>'s shouldn't be generated. But they are.

    Strange thing is, I've tried it using quotation marks and apostrophes on this computer and it still doesn't work as expected. The original version still works which Darren provided, but doesn't work if inverted. The original can be found here

    Any ideas, or am I just being totally stupid?

    I think I can handle the answer

    Thanks,
    Grant

    #2
    If you use 'AND' instead of 'OR', you should be fine.

    Comment


      #3
      I don't know how you do it, but something about you seems to make everything in Actinic look so easy Mr Hackett. Thank you very much - if I had to give a beer for every time a post on this forum has pulled me out of a tight spot, I think we'd have to start using the whiskey

      Now it's time to minimalise the checkout content using AND's and not OR's

      Cheers,

      Grant

      Comment


        #4
        LOL Grant, it's a really easy formula and method to be honest. The time you took to write and explain things, clearly pointed to the fact that the difficult stuff would not be wrong. I guess you'd have checked them three times each (at least). So if the hard stuff is done, it's only the simple stuff you have to fix.

        Either you had your conditions arse upwards (been there done that a million times myself) or you had the joiners arse upwards. You could of course had both of the above. It's an easy mistake tbh, it's not even stupid (damn), the way you wrote would need 4 separate blockifs on the same page, not one blockif with 4 parameters.

        Nice one anyway, made me chuckle .

        Comment


          #5
          For those helpers here that want an easy way to read the crypic stuff within bockif's then http://community.actinic.com/showthread.php?t=33677 lets you create a little webpage that you can stick on your desktop that will turn the Bloody%20hard%20to%20read stuff into eyeball friendly text.
          Norman - www.drillpine.biz
          Edinburgh, U K / Bitez, Turkey

          Comment


            #6
            Wow, that's pretty cool Norm, can you get it to word wrap too?
            We could really do with a widget on the forum for this, be a great addition me thinks.

            Comment


              #7
              Originally posted by leehack View Post
              We could really do with a widget on the forum for this, be a great addition me thinks.
              we could really do with a bloody widget in actinic to do it

              Comment


                #8
                You've got one already Taddy, just hover over it lol .

                Comment


                  #9
                  Originally posted by leehack View Post
                  You've got one already Taddy, just hover over it lol .
                  I ment one that i could edit

                  Comment


                    #10
                    I've added a "Wrap" button - but it only works in IE.
                    Norman - www.drillpine.biz
                    Edinburgh, U K / Bitez, Turkey

                    Comment


                      #11
                      Thanks a lot Lee - everything is sorted now, this has allowed me to strip out some sidebar images which weren't much use in the checkout, for instance the eBay image link - no point promoting another service once I've managed to capture them into the cart. Checkout seems to be going faster now. I thought that SSL issue with Postcode Anywhere had been fixed already - evidently not (Had to manually change the hardcoded link to https as opposed to http)

                      Norman's tool seems very useful - think it's about time I set this up as I'm always seeing weird and wonderful Actinic code on the forum, yet have no idea what it does without messing around with Actinic.

                      So thanks again to the pair of you

                      Comment

                      Working...
                      X