![]() |
Hi,
i'm new on codeigniter4 and i'm not sure how the folder-structure should be. Where is the right place for css,js,img etc. for the layout-template For that i think about public/assets/... What is the right place for third-party Plugins e.g. Bootstrap, Select2 etc. For that i think about the same but maybe subfolder. Is it ok or it there a "must be" place or better place for this parts?
12-07-2024, 08:35 AM
(This post was last modified: 12-07-2024, 08:46 AM by captain-sensible. Edit Reason: more )
using labels such as "assett" just complicates things, if your the coder ,then you know whats what and where you put things
this is my public : Code: [andrew@darkstar CI4-CMS]$ tree -L 1 public in js I have: Code: [andrew@darkstar CI4-CMS]$ tree -L 1 public/js in css : Code: [andrew@darkstar CI4-CMS]$ tree -L 1 public/css myStyle.css is: Code: @import url("bootstrap.css"); so basically i have a single style sheet referenced in my view; via import I pull in other style sheets. The order of pulling in means that anything in custom that has same name in bootstrap means , whats in bootstrap gets overwritten my sqlite database goes in writable I make use of bootstrap js for front end via in view just before body end tag like: Code: <script src="<?php echo base_url('js/popper.js');?>"></script> in head tag of view : Code: <link rel="stylesheet" type="text/css" href ="<?php echo base_url("css/myStyle.css"); ?>">
I like to keep all my assets in one place.
.ROOT app system public -- index.php -- assets ---- css ---- js ---- img ---- images ---- etc What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
|
Welcome Guest, Not a member yet? Register Sign In |