最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to insert JavaScript pipe in TypoScript TYPO3 code - Stack Overflow

programmeradmin1浏览0评论

Is it possible to insert pipe | (from JavaScript code) into TypoScript? When I insert that code:

page.jsFooterInline {
 10 = TEXT
 10.dataWrap (
<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick/dc.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>

 )
}

TYPO3 treat the pipe element as wrap and cut all of code behind the pipe.

Thanks for any help

Is it possible to insert pipe | (from JavaScript code) into TypoScript? When I insert that code:

page.jsFooterInline {
 10 = TEXT
 10.dataWrap (
<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-XXXXXXXX-X']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick/dc.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>

 )
}

TYPO3 treat the pipe element as wrap and cut all of code behind the pipe.

Thanks for any help

Share Improve this question edited Aug 6, 2013 at 13:00 Adrian asked Aug 6, 2013 at 12:35 AdrianAdrian 1,0022 gold badges17 silver badges49 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 8

You can insert inline javascript in typoscript template this way:

page.jsFooterInline {

  10 = TEXT
  10.value (
       var _gaq = _gaq || [];
  )
}
发布评论

评论列表(0)

  1. 暂无评论