Or rather $request->getParameter('item');

FYI, you don't need special routing settings for parameters in the
URL. A URL like module/action/parameter1/value, I can get the value of
parameter1 in my action by doing:

$value = $request->getParameter('parameter1');

The best part about symfony's sfRequest object is that it will
automatically clean the submitted for you to help secure your app so
that injection techniques are cleaned out.

On Fri, Apr 23, 2010 at 7:10 AM, Denis Golovin <golovin.de...@gmail.com> wrote:
> You can get id in your action:
>
> $id = $request->getParameter('id');
>
> and use this id for any queries you like.
>
>
>
> 2010/4/23 bklshblues <ashleyrevl...@gmail.com>:
>> I'm a symfony beginner and I'm looking for some help on what's
>> probably a very obvious question. I want to use a variable in my url,
>> where the variable is the id of an item, then display only that item
>> on the page. I think the routing.yml url would be this:
>> /item/:id
>>
>> How in the item/actions.class.php file would I reference that id? I
>> want to use it in a Doctrine_Query to return that item from the
>> database.
>>
>> --
>> If you want to report a vulnerability issue on symfony, please send it to 
>> security at symfony-project.com
>>
>> You received this message because you are subscribed to the Google
>> Groups "symfony users" group.
>> To post to this group, send email to symfony-users@googlegroups.com
>> To unsubscribe from this group, send email to
>> symfony-users+unsubscr...@googlegroups.com
>> For more options, visit this group at
>> http://groups.google.com/group/symfony-users?hl=en
>>
>
> --
> If you want to report a vulnerability issue on symfony, please send it to 
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>



-- 
Gareth McCumskey
http://garethmccumskey.blogspot.com
twitter: @garethmcc

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to