1

I'm new with Symfony 3, and I'm trying to figure how to implement in my @Route with #order just only to show the exact position of the render page... but when I define in my @Route this way:

 @Route("/{orderNumber}/details{_attr}" <--- this part

or with:

 @Route("/{orderNumber}/details#order" <--- this part

It doesn't work the code is:

From the controller

/**
 * @Route("/{orderNumber}/details{_attr}", 
 *
 * @param string $orderNumber
 *
 * @return Response
 */

From the html.twig

<div class="order container" id="order"> <--- to show at this part
 <div class="order-header row">
  <div class="order-title col-xs-12 col-md-6 col-lg-8">

So... I need help in this point because I don't have idea how to implement correctly.

AnubisVolga
  • 311
  • 3
  • 18

1 Answers1

1

If you want to pass default value to route for example here:

https://symfony.com/doc/current/routing.html#advanced-routing-example

Else if you want just html hash link You don't need to pass default value to your route. Because Browser can automaticly scroll to your html code where you ID.

FOR EXAMPLE HERE:

http://w3c.github.io/html-reference/a.html#a-tags

Imanali Mamadiev
  • 2,604
  • 2
  • 15
  • 23