title: Putting /assets folder into /application in CodeIgniter
body: <p>I'm starting studying <a href="http://ellislab.com/codeigniter" rel="nofollow">CodeIgniter</a> and, before going deeply into it, I'm considering and analysing some scenarios.</p>
  
  <p>One of these is about the assets (css/js/img) folder: googling around, the main trend is to put the assets folder in the root, at the same level of /system and /application; given the case that I could have more than one application (as stated here: <a href="http://ellislab.com/codeigniter/user-guide/general/managing_apps.html" rel="nofollow">http://ellislab.com/codeigniter/user-guide/general/managing_apps.html</a>), each one with its own assets folder, the most logical solution for me is to put the /assets folder INTO /application folder - this seems also more "portable"</p>
  
  <p>Ok, now the question: how do I reference the assets files into my views? If /assets folder is in the root, I read around that I can reference ie. the .css file like this: <code>&lt;?=base_url()?&gt;/assets/css/style.css</code>
  But what if the /assets folder is inside /application, since I can't use <code>&lt;?=base_url()?&gt;/application/assets/css/style.css</code> ?</p>
  
  <p>Thanks in advance!</p>
  
  <p>@Brendan: Hi Brendan, thanks for the comment; I'll explain better the "portability" starting from the issue of having more than one application (/application1, /application2, etc., that is my starting point of the answer; no problem if I've only one application, but I'm prefiguring the scenario of having more than one)</p>
  
  <p>Having the /assets folder at the same level as index.php means that I could end up having many subfolders as are my applications, like /assets/application1, /assets/application2, etc.</p>
  
  <p>If I'd ever have to move the applicationX folders to some other computer I should remember to move also the corresponding /assets/applicationX folder; if I'd ever rename the /applicationX to /newnameX, I should remember to rename also the /assets/applicationX to /assets/newnameX to don't get a mess</p>
  
  <p>Having /assets INTO /application saves me from all these problems, that's my thinking; the idea of a helper is nice, as states this article that I just found and that seems to solve exactly the questions I'm asking: <a href="http://heybigname.com/2009/11/23/managing-assets-with-codeigniter/" rel="nofollow">http://heybigname.com/2009/11/23/managing-assets-with-codeigniter/</a></p>