Announcement

Collapse
No announcement yet.

more conditions

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

    #16
    Hi Zoltan, thanks for clearing that up.

    Can this be applied using two variables? i.e. the trigger word coming from a variable set at sectionlevel.

    So basically: BlockIf ProductDescription contains text from VariableX


    Thanks!

    Comment


      #17
      You are welcome.

      Yes, it is possible. You can use arbitary PHP expressions combined with any valid Actinic variable in the if blocks. E.g.
      Code:
      <actinic:block if="false%20%21%3d%3d%20stristr%28%3cactinic%3avariable%20name%3d%22ProductDescription%22%20%2f%3e,%20%3cactinic%3avariable%20name%3d%22MySectionLevelVariable%22%20%2f%3e%29" >
      	<br/><b>This product's description contains the value of my section level variable</b><br/>
      </actinic:block>
      This is going to display the text only in case the product description contains the string defined in "MySectionLevelVariable".

      I hope it helps.
      Zoltan
      Actinic Software
      www.actinic.co.uk

      Comment


        #18
        Thank you Zoltan,

        I tried that (a custom variable prefixed with MainSection:: ) but it flashed up Invalid expression. However, thanks to your example I've managed to get it working by switching to advanced view in the Layout Code window.

        Seems the possibilities are endless if you've time to learn PHP


        edit: Having used MainSection::MyVariable and restarting Actinic the error list is lit up with Syntax Error in Objects Condition as the fault. Any ideas?

        Comment


          #19
          I'm not sure I understand the issue here. Do you mean the condition works properly but it is reported as a coding error?
          Zoltan
          Actinic Software
          www.actinic.co.uk

          Comment


            #20
            Yes, it works fine. It just reports the error "Syntax Error in Objects Condition"

            It didn't happen until I restarted Actinic.

            So, I added encoding="actinic" to MainSection::MyVariable in the condition editor and the error ! has gone out.

            Perhaps it's something to do with MainSection::

            Comment


              #21
              Sorry for starting up an old thread, but wondered if the blockif/blockelse features are in v9 - I've looked but can only see the obvious blockif.

              What I'm trying to do is with the GeoTrust 'site seal'. The code they give you is to embed a link, with the source as:

              SRC=//smarticon.geotrust.com/si.js

              Obviously Actinic adds 'acatalog' to this (acatalog///smarticon.geotrust.com/si.js), as it likes to do.

              On this thread - there is a partial fix, which I have already implemented. But I obviously get a JS file being called from a non-secure (http) link on the secured pages (https) on the site.

              I was hoping, through use of some blockif's and else's, to effectively create the following using the SSLUsed variable:

              blockif SSLUSED {
              src=https://smarticon.geotrust.com/si.js
              }
              else {
              src=http://smarticon.geotrust.com/si.js
              }

              Can some kind sole give me any pointers?

              Cheers,
              Grant

              Comment


                #22
                Unfortunatly Actinic doesn't have this feature ATM.
                Zoltan
                Actinic Software
                www.actinic.co.uk

                Comment


                  #23
                  Originally posted by zmagyar View Post
                  Unfortunatly Actinic doesn't have this feature ATM.
                  Thanks for the reply Zoltan. Is this feature likely to be added in the near future?

                  Furthermore, can you suggest a possible fix for this issue?

                  Thanks

                  Comment


                    #24
                    why not use a true false arrangement?

                    sslused==true

                    sslused==false
                    - or -
                    sslused <> true

                    Comment


                      #25
                      There is an SSL switch of somekind in actinic as i have seen it being used, maybe on the GA scripts. Sure there is something that specifies whether SSL is used or not.

                      Comment


                        #26
                        this is actually a javascript.

                        HTML Code:
                        function getProtocol()
                        {
                            return document.location.protocol;
                        }

                        Comment


                          #27
                          IsSplitSSLSubdomain seems to be the only SSL related variable which GA uses, so looks like Gabe's idea is the way forward.

                          For some bizarre reason I was having difficulty with the logic of using == true and == false earlier this afternoon.

                          Now that I've had some beans on toast, everything seems clear

                          Thanks guys

                          Comment

                          Working...
                          X