Examples of integrating same view + procedure across many pages?

#1
[eluser]Ki[/eluser]
Anybody has a good examples of integrating a process + related view across many pages?
For example, if "contact us" form is presented in many pages, I can create a view for that form and just load it in many controllers. But since all processing should be done in controller, I would have to add a checker for $_POST event in every controller where the view exists, to see if the form has been submitted and echo "Thank you".
To avoid duplicating this event checker for $_POST in every controller that loads "contact us" page, I could add this check to the view itself, but then it would go against the design gudelines of the CI framework
Anybody has good implementations of this?

#2
[eluser]JoostV[/eluser]
Create a contact model or library and put all the business logic in there, so you can reuse it.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.