2
votes

i am using symfony 1.4.11; use_helper('Url').

On using link_to('new',course/course/type/new), the url it show is ../backend_dev/backend_dev/Course/course/type/new instead of ../backend_dev/Course/course/type/new. Same issue exist for form_tag also.

Edit

Above issue was solved.By setting no_script_name: true at config and clearing cache.

But image_tag(),use_stylesheet() and use_javascript() gives path as for example

use_javascript('jquery-1.6.1.min.js') ==>../web/backend_dev/js/jquery-1.6.1.min.js

instead of

use_javascript('jquery-1.6.1.min.js') ==>../web/js/jquery-1.6.1.min.js

Any help appreciated.

1
Did you change your sf_web_dir configuration? What's up with the relative paths?Arend

1 Answers

3
votes

Hard to say without your full routing.yml but the one thing i see is that your internal_uri should be expressed as an abs url with a query string like:

link_to('new','/Course/course?type=new');

Note the forward slash at the beginning. Also the module name should be the real module name, not the routed one so if the maodule is /apps/backend/modules/Course then the module in the internal URI should be Course not course same with the action name.

If the route is named then you should use one of the following:

link_to('new','@routename?type=new');

OR

link_to('new','routename', array('type'=>'new'));