Controller logic within a view...

edited August 2012 in Installation
This might be obvious, but i've only just started using fuel, i was wondering if anyone could help..

For my site I have a footer section which contains some information, and i also want it to contain a form for users to subscribe to a newsletter. My footer is currently a block.

The form is going to need some controller logic... but I don't know how to do this!
In Zend, there is a function $this->action('method','controller'); that you execute from the view and this will include the relevant view file and has the controller logic too. Is it possible to use multiple controllers on one page in fuel?

What's the best way to go about doing this? (where should i put my logic!)

Comments

  • edited 2:42AM
    You can create a normal CI controller to process any form logic and then set the action of your form to that controller (e.g. /forms/process would be a controller named forms calling a method "process").

    You may already be familiar with CI controllers but if not, here is some more info:
    http://codeigniter.com/user_guide/general/controllers.html
Sign In or Register to comment.