-
Notifications
You must be signed in to change notification settings - Fork 0
Header and Footer and Menu on every page
[b]The Goal:[/b]
You have some content - typically a header and footer, perhaps a menu that maybe lives in a div - and you want to present these items on pretty much every page on your site.
The problem is that you don't want to cut-and-paste that code into each of your views - it's a mess to maintain, and it's not a very elegant approach.
[b]Discussion:[/b]
Broadly speaking there are a handful of approaches to this challenge:
[b]o[/b] Prepare the common view-snippets early on, and display them in one go with the page-specific data using a generic or main view file. [b]o[/b] ... ?
[b]The approaches:[/b]
[b]o[/b] Header and Footer and Menu on every page - jedd - using a master view, and extending MY_Controller, [b]o[/b] Header and Footer and Menu on every page - yournamehere -description of your approach goes here ...
[b][i][color=grey]Need to automatically insert category/subcategory listing here somehow, later - for the moment I'll handcode in the first couple of links[/color][/i][/b]