2016-08-31 4 views
0

최신 Sylius를 사용 중이며 백엔드에서 정적 페이지를 만들었습니다.Twig (Sylius)의 정적 페이지 연결

내부 이름은 ueber-uns이며 거기에 링크 된 경로를 만들었습니다. 그래서 내가 mywebsite.com/ueber-uns을 찾을 때 작동합니다.

이제 Twig 템플릿에 경로를 생성하는 데 문제가 있습니다. 내가 함께했다 유일한 것은이 있었다 :

<a href="{{ path('sylius_static_content_show', {'path': 'uber-uns'}) }}">Über uns</a>하지만 내가 워드 프로세서에서 발견

경로 'sylius_static_content_show'을 (를) 찾을 수 없습니다 "오류

유일한 페이지 emtpy이었다가 발생합니다. : 다른 곳 http://docs.sylius.org/en/latest/book/content.html?highlight=static

그에 대한 정보를 찾을 수 있습니다

답변

0

시도의 USI? 경로

<a href="{{ path('sylius_static_content_show', {'name': 'uber-uns'}) }}">Über uns</a> 

이의 인수 대신 pathname을 겨 것은

sylius_shop_static_content_show: 
    path: /{name} 
    methods: [GET] 
    defaults: 
     _controller: sylius.controller.static_content:showAction 
     _sylius: 
      template: SyliusShopBundle:StaticContent:show.html.twig 
      repository: 
       method: findPublishedOneByName 
       arguments: [$name] 
ShopBundle

에서 경로 정의입니다