On Mon, August 23, 2010 11:56 am, psybear83 wrote:
>> i think problem is here.....your link should look like
>> "controller/action/params" so in your case: posts/delete/post_id
>
> Thanks, this works! However, I didn't write the code myself but it was
> generated using bake. So I guess there's some bug in the current Cake
> version... The code that it's using is:
>
> <?php echo $html->link(
> 'Delete',
> array('action'=>'delete',
> 'id'=>$post['Post']['id']),
> null,
> 'Are you sure?'
> )?>
>
> ...which generates posts/delete/id:X instead of posts/delete/id. How
> can I fix that?
<?php echo $this->Html->link(__('Delete', true), array('action' =>
'delete', $id), null, sprintf(__('Are you sure you want to delete # %s?',
true), $id)); ?>
is the baked version.
You wont need to define id in your link as your action doesnt require it
to be named.
>
> Thanks
> Josh
>
> 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 [email protected]
> To unsubscribe from this group, send email to
> [email protected] For more options, visit this group
> at http://groups.google.com/group/cake-php?hl=en
>
>
--
Mike Karthauser
Managing Director - Brightstorm Ltd
Email: [email protected]
Web: http://www.brightstorm.co.uk
Tel: 07939 252144 (mobile)
Fax: 0870 1320560
Address: 1 Brewery Court, North Street, Bristol, BS3 1JS
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 [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en