Jump to:

22977 Posts in 11742 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » Silverstripe + Custom Code restrictions

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: 1144 Views
  • acefx
    Avatar
    Community Member
    8 Posts

    Silverstripe + Custom Code restrictions Link to this post

    Hi
    am am very new to Silverstripe and i have already been working on a special project.
    Well all is going well until i was working on building a custom application using php but silverstripe keeps giving me errors and also i do things like document.getElementById() in Javascript and it does not work.

    can anyone help me out, even if its a function to show me how to go about it.

    NOTE: am still an amateur in PHP so i dont write classes yet.

    Thanks

  • dio5
    Avatar
    Community Member
    501 Posts

    Re: Silverstripe + Custom Code restrictions Link to this post

    I think you'll get more answers if you're a bit more specific about your problem.

    Doing document.getElementById() is javascript, I suppose it's for the frontend site?

    This should work like any normal site, independent of Silverstripe.

    Adding javascript is easy: just put your js file under mysite/javascript and reference it from within the head of your Page.ss in themes/yourtheme/templates/.

    (You could also use a requirements statement in your controller (http://doc.silverstripe.com/doku.php?id=requirements) but I don't tend to do that.)

  • acefx
    Avatar
    Community Member
    8 Posts

    Re: Silverstripe + Custom Code restrictions Link to this post

    Thanks man

    I really appriciate this

    It worked.

    1144 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.