Wednesday, June 30, 2010

Re: xls extension.

sorry.. putting in beforFilter the requestHandler it works? Can somebody explain me why?

On Wed, Jun 30, 2010 at 3:04 PM, emanuele <emanuele.g@gmail.com> wrote:
hello fellows,

is there any possibility to parse an url with xls extensions? Ive tried with pdf it works, but If I try with xls nothing happens.
In my routes.php

Router::parseExtensions('pdf', 'xls');

Router::connect(
        '/mcontrollers/view/:id',
        array('controller' => 'mcontrollers', 'action' => 'view'),
        array(
            'pass' => array('id')
        )
    );

the link

echo $html->link('Export in xls', array('controller' => 'mcontrollers', 'action' => 'view', 'id' => $id , 'ext' => 'xls'))

I ve also tried to set the content type with requesthandler component but, again, nothing happens ($this->RequestHandler->setContent('xls' ,'application/vnd.ms-excel');)!

thanks in advance.

--
Emanuele Gringeri
Computer Engineer
University of Pisa
Be my mirror, my sword and shield



--
Emanuele Gringeri
Computer Engineer
University of Pisa
Be my mirror, my sword and shield

Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions.
 
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: