Welcome Guest, Not a member yet? Register   Sign In
Implementing Navigation Bar
#2

[eluser]CroNiX[/eluser]
I created a simple template library, which is autoloaded. In that library, it automatically generates the header view, login panel view (shows user details if logged in, login form if not), sidebar view and footer view. The template library figures out if the user is logged in or not and loads the appropriate view. That view just looks at the session and sees if their info is present and shows the form if not logged in, or their details and link to their profile if they are. Then, in my controllers, all I have to do is just pass the template library the main content view (using 3rd parameter of load::view() TRUE) and it does the rest. So, the controller is only worrying about what its primary task is and leaves the rest up to the template library.


Messages In This Thread
Implementing Navigation Bar - by El Forum - 02-12-2012, 05:26 PM
Implementing Navigation Bar - by El Forum - 02-12-2012, 07:03 PM
Implementing Navigation Bar - by El Forum - 02-12-2012, 09:03 PM



Theme © iAndrew 2016 - Forum software by © MyBB