0

I am working on the application that contains different-2 modules like html5, flash and i want to redirect user to corresponding module on the basis of the browser compatibility.

1
  • 1
    could you add more details? What have you tried? Commented Jan 5, 2013 at 8:20

1 Answer 1

3

I think the best method is to write a controller plugin for that

class Custom_Plugins_Browsercompatability extends Zend_Controller_Plugin_Abstract
{

    public function dispatchLoopStartup(Zend_Controller_Request_Abstract $request)
    {
        //check browser compatability

        if($html5)
        {
            $request->setModuleName('html');
            $request->setControllerName('index');
            $request->setActionName('index');
        }
        else if($flash)
        {   
            $request->setModuleName('flash');
            $request->setControllerName('index');
            $request->setActionName('index');
        }
}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.