I have different URL's in my sandbox and in my production environment. It is causing problems with my static resources in the css files. In my sandbox the community url is https://mydomain.com/partners, but in production the community url is https://mydomain.com. I hard coded the path of the static resource in the css file in the sandbox like this: url(/partners/resource/gothamhtf_medium_webfont_eot). But obviously in production this doesn't work. Is there a way that I can make it work in both environments?

Thanks in advance

  • I've had this problem before and only got round it by using the branding section of the community to add the location of the css again by hard coding. It might be possible to do it with a lightning template and fetch the url of the community dynamically.
    – Dave Humm
    Aug 15, 2017 at 8:25

1 Answer 1


I had the same issue. The solution is to use the $Resource variable to pull the static resource, as opposed to using the whole path i.e /resource/myresource/files/picture.png



{!$Resource.SLDS102 + '/assets/icons/utility-sprite/svg/symbols.svg#arrowdown'}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .