18590 Posts in 4875 Topics by 2285 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, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 675 Views |
-
scripts in page_controller init

9 January 2010 at 5:22am
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>
| 675 Views | ||
|
Page:
1
|
Go to Top |

