On Wed, Nov 24, 2010 at 8:47 PM, Daniel <[email protected]> wrote:
> Well guys, i trying to setup this Router and i cant made it work,
>
> Some1 have any ideia?
>
> Code:
> http://bin.cakephp.org/view/369700705
>
> URL Should return:
> http://www.domain.com/sapatilhas/1889900-verde/compartilhar-via-email

You need to pass the keys for categoria-slug & modelo-slug.

echo $html->link(
        'E-mail',
        array(
                'controller' => 'modelos',
                'action' => 'email',
                'categoria-slug' => 'sapatilhas',
                'modelo-slug' => '1889900-verde'
        )
);

I changed the regexps, also. Although it's difficult to say what you
need for categoria-slug, what you had didn't appear to make sense.

Router::connect(
        '/:categoria-slug/:modelo-slug/compartilhar-via-email',
        array('controller' => 'modelos', 'action' => 'email'),
        array(
                'categoria-slug' => '[a-z]+',
                'modelo-slug' => '[-a-z0-9]+'
        )
);

That should work for the example URL but can you post more examples of
what might be expected for categoria-slug? If it's not just straight
letters the above will need to be modified.

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

Reply via email to