Best way to load header and footer once globally? |
I was wondering what is the best way to load header and footer files globbaly once, in order to pass data from db in the template. For example, urls, meta descriptions and keywords etc. which will be controlled from the db.
I found this while i was searching the internet: https://stackoverflow.com/questions/9540...odeigniter but i don't know if someone has a better idea. For now i load the files and pass data as usual in every controller like: $this->load->view('templates/header', $data); $this->load->view('pages/[page_name]', $data); $this->load->view('templates/footer', $data); etc... etc... This is fine for small scale sites with one or two controllers. What if i have more?! Any suggestions on that? Thanks! //Life motto if (sad() == true) { sad().stop(); develop(); } |
Messages In This Thread |
Best way to load header and footer once globally? - by HarrysR - 09-28-2018, 07:29 AM
RE: Best way to load header and footer once globally? - by Wouter60 - 09-28-2018, 09:43 AM
RE: Best way to load header and footer once globally? - by HarrysR - 10-02-2018, 07:27 AM
RE: Best way to load header and footer once globally? - by imabot - 10-04-2018, 08:48 AM
RE: Best way to load header and footer once globally? - by ignitedcms - 10-04-2018, 09:26 AM
RE: Best way to load header and footer once globally? - by HarrysR - 10-04-2018, 09:44 AM
RE: Best way to load header and footer once globally? - by davis.lasis - 10-04-2018, 10:37 AM
RE: Best way to load header and footer once globally? - by sintakonte - 10-08-2018, 11:00 PM
RE: Best way to load header and footer once globally? - by HarrysR - 10-09-2018, 04:42 AM
|