Announcement

Collapse
No announcement yet.

Correct use of " block if "

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

    Correct use of " block if "

    Hello

    My actinic has been very slow for ages now and on further research here discovered that external code added such as paypal, google etc can slow down the running of the software when using the tree. Mine is painfully slow and editing products takes hours!!!

    So I discovered here the articles on using block if and /block around the hadded html in concern.

    I did this but the actinic has picked up on all my additions of the block if's as errors on the page!!!???

    Is there a correct way to use the block ifs or a reason I get errors...?

    Thanks for the help in advance

    Bhu
    Last edited by Bhujang; 03-Oct-2012, 02:02 PM. Reason: slight change on title

    #2
    Can you post an example (in "code" tags)?
    The Patchwork Rabbit

    Comment


      #3
      Hello

      I removed the if and the error message seems to have gone away, but actinic is still painfully slow. There must be other items to block...

      here is an example though...

      <actinic:block >



      <!-- Place this render call where appropriate -->
      <script type="text/javascript">
      window.___gcfg = {lang: 'en-GB'};

      (function() {
      var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
      po.src = 'https://apis.google.com/js/plusone.js';
      var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
      })();
      </script>
      </actinic:block>

      and

      <actinic:block >



      <script>(function(d, s, id) {
      var js, fjs = d.getElementsByTagName(s)[0];
      if (d.getElementById(id)) return;
      js = d.createElement(s); js.id = id;
      js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
      fjs.parentNode.insertBefore(js, fjs);
      }(document, 'script', 'facebook-jssdk'));</script>

      </actinic:block>

      Is this the correct use of the block command to stop actinic being laggy?

      Best wishes

      Bhu

      Comment


        #4
        You need to double click on the block statement and add a condition to test if in preview.

        Also make sure you are compacting your database regularly.

        Comment


          #5
          so should I change it back to block if then? Or leave it as just block?

          How do I compact the database?

          cheers

          Bhu

          Comment


            #6
            Hi Duncan

            I found where to compress the data base

            but cant find an expression or condition in the library when I double click the block to test if in preview mode...

            Any ideas there?

            cheers

            Bhu

            Comment

            Working...
            X