Jump to:

23472 Posts in 18941 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Storing custom code, E.G - javascript

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: 296 Views
  • CHD
    Community Member
    218 Posts

    Storing custom code, E.G - javascript Link to this post

    A client of mine uses javascript banners, and would like to be able to add them manually in the CMS, however SilverStripe always strips out all the " & 's. So it never works. have tried lots all the different data types, but it always escapes the special characters.

    is there any way at all to do this?
    If the codes followed a similar pattern I would create a template and let the client just add in the URL that changes etc, but the code is always different depending on the banner supplier. here's an example:

    <script language="JavaScript" type="text/javascript" src="***"></script> </head> <body> <div><span id="text1"> </span><br/></div> <div><span id="text2"> </span><br/></div> <script language="JavaScript">

    var ticker = new Ticker({info: 1, local: 1, casino: 'europa', game: 'car',currency: 'eur'}); ticker.attachToTextBox('text1'); ticker.tick();
    var ticker2 = new Ticker({info: 4, local: 1, casino: 'titan', currency: 'eur'}); ticker2.attachToTextBox('text2'); ticker2.tick();


    as usual, any help is greatly appreciated!

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.