Announcement

Collapse
No announcement yet.

Omitting code from certain pages

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

    Omitting code from certain pages

    Hello,
    I have pasted code in my actinic template side bar for a newsletter sign-up - problem is - my checkout pages are hosted in https - so when you access any cart pages you get the message that some items are not secure do you want to continue (as the code is pulling in from another site)- I don't need the newsletter code on the checkout pages - so is there a way I can omit this code just from the cart pages - currently when I paste in the code it displays on all pages through out the site?

    Many thanks
    Rob

    #2
    You could simply wrap the code inside an Actinic BlockIf which would have a condition applied which would check to make sure it was not on any checkout pages prior to showing the code

    e.g.

    Code:
    <actinic:block if="%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%27Checkout%20Page%200%27%29%20AND%20%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%27Checkout%20Page%201%27%29%20AND%20%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e%20%21%3d%20%27Checkout%20Page%202%27%29" >
        [Your code here]
    </actinic:block>
    is an example of one way to do it.
    Fergus Weir - teclan ltd
    Ecommerce Digital Marketing

    SellerDeck Responsive Web Design

    SellerDeck Hosting
    SellerDeck Digital Marketing

    Comment


      #3
      If you were to add the bounce page to this, what would I need to add to the blockif? (have tried it and failed)
      Reusable Snore Earplugs : Sample Earplugs - Wax Earplugs - Women's Earplugs - Children's Earplugs - Music Earplugs - Sleep Masks

      Comment


        #4
        The test phrase for the Page Types are the same as are in the dropdown selector at the top of the Design Pane.

        Comment


          #5
          Thanks Duncan
          Reusable Snore Earplugs : Sample Earplugs - Wax Earplugs - Women's Earplugs - Children's Earplugs - Music Earplugs - Sleep Masks

          Comment


            #6
            Here's a neater way of checking for all Checkout pages in one go:
            Code:
            (stristr(<actinic:variable name="PageType" />, 'checkout') === FALSE)
            Just paste the above into an empty Condition.

            Or here's the whole thing:
            Code:
            <actinic:block if="%28stristr%28%3cactinic%3avariable%20name%3d%22PageType%22%20%2f%3e,%20%27checkout%27%29%20%3d%3d%3d%20FALSE%29" >
            	CODE NOT FOR CHECKOUT HERE
            </actinic:block>
            Norman - www.drillpine.biz
            Edinburgh, U K / Bitez, Turkey

            Comment


              #7
              This works a treat - thank you for your time.

              Comment

              Working...
              X