Need guide to add Bootstrap in CodeIgniter? |
I have created a website using CodeIgniter and MySQL to display results on a page. Now, I want to enhance the appearance of all the pages, and many sources suggest using Bootstrap for this purpose. However, I have been unsuccessful in integrating Bootstrap into my CodeIgniter project.
Could anyone recommend an up-to-date guide that I can follow to successfully implement Bootstrap into my CodeIgniter project? Thank you in advance for your assistance.
In my CI3 environment I created a folder called static and added bootstrap in a folder below that.
As I am using HMVC, I load bootstrap in my main page like this: PHP Code: <link rel="stylesheet" href="<?= base_url (); ?>static/bootstrap/css/bootstrap.css"> This way the bootstrap css is loaded on every page.
root:
app system public ( public_html - path in spark needs changing if moved! ) ---- assets -------- bootstrap ------------ css ------------ js -------- css -------- js -------- jquery etc Code: <html lang="<?= $locale ?>"> What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
You can find an implementation of Bootstrap 5 used as a swappable admin template on this GitHub Repo:
https://github.com/ozarnet/ci4sampleapp CodeIgniter Wizard (CRUD code generator for Mac) instantly scaffolds Bootstrap-based web applications with an administrative interface (admin templates include Bootstrap5) |
Welcome Guest, Not a member yet? Register Sign In |