[split] Best way to load unique header and footer for each page? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Best Practices (https://forum.codeigniter.com/forumdisplay.php?fid=12) +--- Thread: [split] Best way to load unique header and footer for each page? (/showthread.php?tid=72185) |
[split] Best way to load unique header and footer for each page? - digitalprem - 11-15-2018 hello everyone. I want to create SEO plugin in codeigniter same as Yoast plugin for wordpress. But problem is how to create different header for every page for website more than 300+ pages. Is it possible that I would assign a unique id and than create custom header for every pages. RE: [split] Best way to load unique header and footer for each page? - dave friend - 11-15-2018 As you've probably considered, it's easy to provide dynamically determined values to the header. Controller PHP Code: $data['page_title'] = $title; The view file header.php PHP Code: <!doctype html> The hard part is determining what values to assign to $title, $meta_desc and $meta_keys. I assume that's the question you're really asking. The answer depends on several factors:
Care to tell us about all that? RE: [split] Best way to load unique header and footer for each page? - digitalprem - 11-17-2018 Oh thanks mate !!!!! You saved my lot of time. |