On Fri, Feb 4, 2011 at 3:20 AM, newguy <aimanparv...@gmail.com> wrote:
> In continuation of the previous post:
> In my site on page display there are 4 links and user clicks on it to
> download 4 different files. This is the cpt file for this:
>
> <p>Select the game to download</p>
> <ul>
> <li><?php echo $html->link('Game 1',array('action'=>'download')); ?></
> li>
> <li><?php echo $html->link('Game 2',array('action'=>'download1')); ?></
> li>
> <li><?php echo $html->link('Game 3',array('controller' =>
> 'users','action' => 'download','slug' => Inflector::slug('game'))); ?
>></li>
> <li>Game 4</li>
> </ul>
>
> This is my Router::connect:
>        Router::connect('/users/
> display/:slug',array('controller'=>'users','action'=>'download'),array('slug'=>'[-0-9a-
> z]+','pass'=>array('slug')));
> This file to be downloaded on clicking link three is game.zip

You're getting close. There's no need to call Inflector::slug(),
though, if you're going to hard-code the file.

So, is this not working?

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to