Welcome Guest, Not a member yet? Register   Sign In
Autoloading library methods?
#13

[eluser]Wayne Smallman[/eluser]
[quote author="Phil Sturgeon" date="1296510769"]Right, a Navigation would be part of the adnmin panel, so you make an Admin_Controller. This is not pointless messing around. you assign $this->data['message_count'] in the base class then :

$this->load->view('whatever', $this->data);

The base class is more effective than hooks as you cannot really pass data around as well in a hook. You could do $this->load->vars('message_count', $message_count) but that is a bit too "magic".

Use base controllers, they will be insanely useful to you as you move forwards.[/quote]
Hi Phil. I know what you're getting at, but I've already defined the views for the navigation, so I'd have to remove them (of which there are many) all to feel the benefit of your technique.

In hindsight, had I known about this technique before starting work, I would be fully appreciating those benefits. I'll have a read through your documentation to see whether it's going to be practical to do what you suggest.

The problem is, though, views (amongst other things) aren't always going to be the same, and some pages (like the page for the web browser button when adding bookmarks) won't need a view for the navigation.

So rather than reduce complexity, I'd most likely be increasing it and totally overloading the application from the get go with umpteen checks for this, that and t'other.


Messages In This Thread
Autoloading library methods? - by El Forum - 01-31-2011, 04:21 AM
Autoloading library methods? - by El Forum - 01-31-2011, 06:45 AM
Autoloading library methods? - by El Forum - 01-31-2011, 06:53 AM
Autoloading library methods? - by El Forum - 01-31-2011, 07:18 AM
Autoloading library methods? - by El Forum - 01-31-2011, 07:42 AM
Autoloading library methods? - by El Forum - 01-31-2011, 07:59 AM
Autoloading library methods? - by El Forum - 01-31-2011, 08:07 AM
Autoloading library methods? - by El Forum - 01-31-2011, 08:11 AM
Autoloading library methods? - by El Forum - 01-31-2011, 09:13 AM
Autoloading library methods? - by El Forum - 01-31-2011, 09:15 AM
Autoloading library methods? - by El Forum - 01-31-2011, 09:23 AM
Autoloading library methods? - by El Forum - 01-31-2011, 09:52 AM
Autoloading library methods? - by El Forum - 01-31-2011, 10:04 AM
Autoloading library methods? - by El Forum - 01-31-2011, 11:47 AM
Autoloading library methods? - by El Forum - 01-31-2011, 12:28 PM
Autoloading library methods? - by El Forum - 01-31-2011, 12:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB