Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
symfony: question about routes and url_for()
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
tirengarfio  
View profile  
 More options Aug 9 2011, 7:36 am
From: tirengarfio <tirengar...@gmail.com>
Date: Tue, 9 Aug 2011 04:36:59 -0700 (PDT)
Local: Tues, Aug 9 2011 7:36 am
Subject: symfony: question about routes and url_for()
Hi,

I have this route:

category_set_representative_image:
  url:     /categoria-settare-immaggine-rappresentativa
  param:   { module: category_new, action: setRepresentativeImage }
  class:   sfDoctrineRoute
  options: { model: Category, type: object }

and a link associated to this:

url_for('category_set_representative_image', array('sf_subject' =>
$category))

When I click the link I get:

    sfError404Exception: Action
"categoriasettareimmagginerappresentativa/index" does not exist.

Any idea?

sf 1.4

Javi


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Re : symfony: question about routes and url_for()" by Serge HARDY
Serge HARDY  
View profile  
 More options Aug 9 2011, 8:17 am
From: Serge HARDY <serge.ha...@gmail.com>
Date: Tue, 9 Aug 2011 05:17:49 -0700 (PDT)
Local: Tues, Aug 9 2011 8:17 am
Subject: Re : symfony: question about routes and url_for()

that's:

 url_for('*@*category_set_representative_image', array('sf_subject'
=> $category))


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "symfony: question about routes and url_for()" by Marcos Ibanez
Marcos Ibanez  
View profile  
 More options Aug 9 2011, 12:39 pm
From: Marcos Ibanez <mgi1...@gmail.com>
Date: Tue, 9 Aug 2011 09:39:01 -0700
Local: Tues, Aug 9 2011 12:39 pm
Subject: Re: [symfony1] symfony: question about routes and url_for()
Hi tirengarfio, the first parameter for url_for is an "internal uri"
as is stated on the api documentation here

http://www.symfony-project.org/api/1_4/UrlHelper#method_url_for

This basically means that you should use the url and not the route
name as a first parameter, in your case:

url_for('category_new/setRepresentativeImage', array('sf_subject' => $category))

Or, if you want to make it a little faster, you can use directly the
route name as in:

url_for('@category_set_representative_image', array('sf_subject' => $category))

Hope it helps,

Kind regards.

--
Marcos Gabriel Ibañez
MSN: mgi1...@gmail.com
http://blog.mibanez.com.ar
Twitter: @mgi1982


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »