Welcome Guest, Not a member yet? Register   Sign In
Show message rather than load a view
#6

[eluser]kurucu[/eluser]
It sounds like flashdata might be the answer then. Or some similar construct in your preferred session handler.

Either way the concept is this:

1. For each message generated, you queue it into a session object somewhere (flashdata if you use CI's library)
2. You load the messages into the view variables (you can load global view data, I forget the function name)
3. You have a hook in your parent view (template) that looks for this data and displays it if set.

With CI, flashdata is automatically erased at the end of the next request, so the user would only see it once. You'd have to implement this yourself if you choose another method without it.

Edit: Re-reading your reply, it sounds like the message is to be posted during the same request, in which case you can just build a message queuing system (an array lol) which you look for and output in the view.


Messages In This Thread
Show message rather than load a view - by El Forum - 09-21-2009, 06:09 AM
Show message rather than load a view - by El Forum - 09-21-2009, 07:06 AM
Show message rather than load a view - by El Forum - 09-21-2009, 07:12 AM
Show message rather than load a view - by El Forum - 09-21-2009, 07:18 AM
Show message rather than load a view - by El Forum - 09-21-2009, 07:22 AM
Show message rather than load a view - by El Forum - 09-21-2009, 07:28 AM
Show message rather than load a view - by El Forum - 09-21-2009, 07:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB