Hi all.
Having just put Google +1 on our website I found it disables the ability to select parts of a layout on a page to work on them in code view.
The answer is the same as Facebook Iframes, use a blockif statement to disable the code in preview mode-just use this:
[<actinic:variable name="IsPreviewMode" /> == false]
<glusone size="medium"></glusone>
<!-- Place this tag after the last plusone tag -->
<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></p>
/block
Having just put Google +1 on our website I found it disables the ability to select parts of a layout on a page to work on them in code view.
The answer is the same as Facebook Iframes, use a blockif statement to disable the code in preview mode-just use this:
[<actinic:variable name="IsPreviewMode" /> == false]
<glusone size="medium"></glusone>
<!-- Place this tag after the last plusone tag -->
<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></p>
/block
Comment