Announcement

Collapse
No announcement yet.

How do I hide some of my code from 'Preview'

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

    How do I hide some of my code from 'Preview'

    Sometimes you will have some code in your designs (e.g. an affiliate tracking scheme) that will only work online, and may actually have an adverse effect on the performance of the preview.

    If this is the case, it is possible hide it from appearing in the preview with a condition. The code will then only be included in the store pages in the online store.

    To do this, highlight the code you want to hide in the 'Layout Code' panel in the 'Design' tab, and then click the 'Insert Condition' button ().

    Use the following condition:



    Here is some code to copy and paste to create the condition:

    <actinic:variable name="IsNotPreviewMode" />

    Then click 'OK' and click 'Apply' in the 'Layout Code' panel, and the code should vanish from the preview. It will be there in the online store though.
Working...
X