2014-06-09 2 views
0

로그인 번들의 색인 페이지에 로그인 및 리디렉션 : 번들이 있습니다. 리디렉션 번들의 페이지에 대한 링크를 만들고 싶습니다. 심포니에서 새로 왔으며 라우팅 문제 : 여기 제 2 개 경로 파일입니다다른 번들의 페이지로 연결되는 경로

An exception has been thrown during the rendering of a template ("Route "gs_redirect_crud" does not exist.") in LoginLoginBundle:Default:welcome.html.twig at line 11. 
: 나는 나뭇 가지 파일

<a href="{{path('gs_redirect_crud')}}" >Add New Redirection</a> 

에서 만든하지만 난이 오류가 무엇을했다

login_login_homepage: 
pattern: /login 
defaults: { _controller: LoginLoginBundle:Default:index } 

login_login_signup: 
pattern: /signup 
defaults: { _controller: LoginLoginBundle:Default:signup } 

login_login_logout: 
pattern: /logout 
defaults: { _controller: LoginLoginBundle:Default:logout } 
login_login_home: 
pattern: /home 
defaults: { _controller: LoginLoginBundle:Default:home } 

2nd: 
gs_redirect_crud: 
resource: "@GSRedirectBundle/Resources/config/routing/redirect.yml" 
prefix: /

도움 사람 ??????? 더는

"gs_redirect_crud" 

경로

정의가 없기 때문에

답변

1

그것은 분명 사실입니다.

2 명령은

@GSRedirectBundle/Resources/config/routing/redirect.yml 

파일에 설명 된 경로를 정의 세트를 포함한다. 해당 파일에서 올바른 경로 이름을 찾으십시오.

+0

모돈 모자 내가해야합니까? –

+0

위에서 말했듯이, @ GSRedirectBundle/Resources/config/routing/redirect.yml을 열어서 만들고 싶은 링크를 찾으십시오. – fperet

0

전역 경로로 gs_redirect_crud를 설정할 수 있습니다.

코드에 심포니 - 응용 프로그램/응용 프로그램/설정/config.yml :

framework: 
    router: 
     resource: "%kernel.root_dir%/config/routing.yml" 
    validation:  { enable_annotations: true } 

코드 심포니 - 응용 프로그램/응용 프로그램/설정/routing.yml :

첫 번째 옵션 :

gs_redirect_crud: 
resource: "@GSRedirectBundle/Resources/config/routing/redirect.yml" 
prefix: /

2 옵션 :

gs_redirect_crud: 
resource: "@GSRedirectBundle/Controller/" 
type: annotation 
prefix: /
관련 문제