Page.ss wont load my css and script files

silverstripe-4
Tags: #<Tag:0x00007f08272851a0>

#1

I have followed carefully the instructions but i am still not able to get my css and scripts links running in my Page.ss . updated the links in hrefs but it still wont work


#5

Hi lmnlis,

Try this,
Add css and js in the file path : themes/your-theme-name/templates/Page.ss , like this ,

  • Make sure your css & js in respective folders : public/resources/themes/your-theme-name/css/ & public/resources/themes/your-theme-name/javascript/ .

Hope it helps you.

Thanks!


#8

This is gold! Thank you so much! Why was this not discussed on their tutorials on vimeo neither was mentioned on the lesson in their website? i


#2

Hi lmnlis
I had a same probleme with you. I’m using SS 4.2.1 and I think that my css and javascipt files do not load.
This is my PageCotroller.ss code

Someone can help me please. Thanks for your contribution.


#4

HI lmnlis.
I added requirements by myself because my PageController.php was empty.Thanks


#3

are you the one who added the requirements? or are they just there by default? mine has none of those.


#6

Hi addwebsolution
I try your proposition but anything don’t change.
This is my Page.ss


#10

Hey @addwebsolution
Thank you. Everything is ok.
you can look a site here : Techno Assistance : Plateforme d’assistance de panne informatique à distance. or
www.techno-assistance.com
Thanks.


#9

Hey @dendescie ,

Try with cache clear, using your-domain-name/dev/build?flush=all.


#11

Hey @dendescie

Great :slightly_smiling_face:


#12

Hi @dendescie,

Happy to hear that my solution work for you then please give like to my post.

Thanks!