File path for CSS Static Resource?

  • 1
  • Question
  • Updated 3 years ago
  • Answered
I'm a little confused as to the formatting for the 'File Path' field for a static resource. I have a file called HoverCSS that is loaded into the Static Resources in Salesforce-- what should go into the File Path field in order to be able to reference that file?
Photo of pFranzen

pFranzen

  • 222 Points 100 badge 2x thumb

Posted 4 years ago

  • 1
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Have you tried leaving the File Path field empty?
Photo of pFranzen

pFranzen

  • 222 Points 100 badge 2x thumb
Ah, I guess I was misinterpreting what that field is for. So the only field I need to worry about is the Resource Name?

Even with just that filled in, I'm still having some trouble using the custom css file.
Photo of Zach McElrath

Zach McElrath, Employee

  • 48,984 Points 20k badge 2x thumb
What sort of trouble are you experiencing? Is the CSS file being loaded successfully, or not at all?
Photo of Ben Hubbard

Ben Hubbard, Employee

  • 12,470 Points 10k badge 2x thumb
The path is only necessary if your Static Resource is a zip file.  If you just uploaded the CSS file as a static resource, then you should leave that field blank.
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Do you know how to check if the file is loaded?  Open Chrome Developer Tools and check the Resources folder in the Sources Tab.
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Did you select the Public option for Cache Control?  

Take a look at this tutorial http://help.skuidify.com/s/tutorials/m/getting-started/l/151288-copy-paste-a-set-of-sample-pages-you... and the section How to Create the OpportunityJS Static Resource.
Photo of Irvin Waldman

Irvin Waldman, Champion

  • 9,006 Points 5k badge 2x thumb
Check out this video starting a little after minute 6:00.  John explains how to configure static resources.

https://www.youtube.com/watch?v=7bt5-QpEUn8