21491 Posts in 5783 Topics by 2622 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1058 Views |
-
Silverstripe + Custom Code restrictions

31 January 2009 at 3:43am
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
-
Re: Silverstripe + Custom Code restrictions

1 February 2009 at 5:53am Last edited: 1 February 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 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.)
-
Re: Silverstripe + Custom Code restrictions

5 February 2009 at 8:53pm
Thanks man
I really appriciate this
It worked.
| 1058 Views | ||
|
Page:
1
|
Go to Top |

