Jump to:

23480 Posts in 18951 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » scripts in page_controller init

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 972 Views
  • George
    Avatar
    Community Member
    41 Posts

    scripts in page_controller init Link to this post

    Hi

    Scripts that are included in page.php (for example sifr) are parsed inside another scripts in the html body:

    Page.ss:

    <!-- Google Analytics -->
    <script type="text/javascript">var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script>
    <script type="text/javascript">try {var pageTracker = _gat._getTracker("UA");pageTracker._trackPageview();} catch(err) {}</script>
    <!-- End Google Analytics -->

    </body>
    </html>

    with activated sifr in Page.php:

    <!-- Google Analytics -->
    <script type="text/javascript">var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));</script>
    <script type="text/javascript" src="http://www/sifr/javascript/sifr.js?m=1262963399"></script><script type="text/javascript">//<![CDATA[
    var lt = { src: 'themes/gg/fonts/lt.swf', ratios: ''};sIFR.activate(lt);

    //]]></script><script type="text/javascript">try {var pageTracker = _gat._getTracker("UA");pageTracker._trackPageview();} catch(err) {}</script>
    <!-- End Google Analytics -->

    </body>
    </html>

    972 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.