CodeIgniter Forums
Assets Folder Location - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: Assets Folder Location (/showthread.php?tid=51877)



Assets Folder Location - El Forum - 05-21-2012

[eluser]Unknown[/eluser]
Hello,

I am new to Codeigniter, and I have a question about placement of my assets folder (specifically, a folder containing my CSS stylesheets).

I have read comments suggesting that it is best practice to place the assets folder at the same level as the application and system folders. However, I would like to place the assets folder within the application folder, because I want to use php application functions within my CSS script (specifically, I want to be able to use the base_url() function within my CSS script, and to my understanding this requires the CSS file to be located under the application folder). But if I place the assets folder under the application folder, my views cannot access the stylesheets enclosed within the assets folder, since the application folder can only be accessed through index.php (that is to say, I am unable to link my views to the CSS sheets using the "href" attribute within the <link> tag).

I apologize if my question is vague or if my problem was improperly laid out. Thank you so much for your help!


Assets Folder Location - El Forum - 05-21-2012

[eluser]InsiteFX[/eluser]
Code:
ROOT
application
assets
-- css
-- images
-- js
-- etc
system
index.php