Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

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

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

Silverstripe + Custom Code restrictions

Go to End

3 Posts   1626 Views


Community Member, 8 Posts

31 January 2009 at 3:43am

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.



Community Member, 501 Posts

1 February 2009 at 5:53am

Edited: 01/02/2009 6:01am

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 in themes/yourtheme/templates/.

(You could also use a requirements statement in your controller ( but I don't tend to do that.)


Community Member, 8 Posts

5 February 2009 at 8:53pm

Thanks man

I really appriciate this

It worked.