3

I need to use few static files(images, css) in one of my template. Currently I am using a CDN link to the same, but in practice storing the same within the extension will ensure the availability even if the links stop working.

Where should I put such files in my extension, should putting them in the template folder itself is the right practice?

1 Answer 1

3

Typically your extension directory would contain subdirectories named css and js and resources of those types would go in there.

To load them on-demand, use CRM_Core_Resources.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.