Welcome Guest, Not a member yet? Register   Sign In
One method for multiple controllers?
#1

[eluser]erik.brannstrom[/eluser]
Hi!

I'm building a site which features some basic community functions, pretty much meaning a simple messaging system. The messaging functionality is up and running, problem is I now want the link to the inbox to reflect wheter or not there are unread messages waiting.

This link is in the header view, which is loaded in every controller. I want it to check for new messages on every page load but I can't figure out how to do that without breaking the MVC model and without having to repeat the same line of code in every controller.

Is a hook at post_controller_constructor a possible solution? I just have a feeling that this is not what is meant by "extending the framwork core".. All suggestions are very much welcome!

Best regards,
Erik Brännström


Messages In This Thread
One method for multiple controllers? - by El Forum - 07-16-2008, 11:58 AM
One method for multiple controllers? - by El Forum - 07-16-2008, 12:23 PM



Theme © iAndrew 2016 - Forum software by © MyBB