Answers.Body: <p>Typically your extension directory would contain subdirectories named <code>css</code> and <code>js</code> and resources of those types would go in there.</p>
  
  <p>To load them on-demand, use <a href="http://wiki.civicrm.org/confluence/display/CRMDOC/Resource+Reference" rel="nofollow">CRM_Core_Resources</a>.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-08-16T14:36:37.373Z
Answers.LastActivityDate: 2015-08-16T14:36:37.373Z
Answers.UserDisplayName: Coleman
Body: <p>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. </p>
  
  <p>Where should I put such files in my extension, should putting them in the template folder itself is the right practice?</p>
  
Tags: <gsoc>
Title: Where should I put static files in my extension that are just used in certain few pages?
ThreadText: # Where should I put static files in my extension that are just used in certain few pages?
  
  (Asked by: username_0 on 2015-08-16)
  
  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?
  
  **Tags:** gsoc
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2015-08-16. Score: 3 | Accepted answer
  
  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](http://wiki.civicrm.org/confluence/display/CRMDOC/Resource+Reference).
  
  
  ---
  
  