0

I want to write this:

{{ path('article_show', { 'slug': article.slug }) }}

but for a internal link, like:

<a href="#ID_name">...</a>

in html, and also by passing one o more parameters.

I use Twig in one Symfony 4 proyect.

Imanali Mamadiev
  • 2,604
  • 2
  • 15
  • 23
M. Galardi
  • 130
  • 2
  • 13
  • 2
    Possible duplicate of [How to use anchors in Symfony routing?](https://stackoverflow.com/questions/36910829/how-to-use-anchors-in-symfony-routing) – Philippe-B- Apr 12 '18 at 22:27

1 Answers1

0

You can pass as many arguments as you want, like array:

{{ path('article_show', {'slug': article.slug, 'param': article.param, ...}) }}
Imanali Mamadiev
  • 2,604
  • 2
  • 15
  • 23
  • I know that. On the other hand this solution: $this->get('router')->generate('user_settings', ['_fragment' => 'password']); reload the page and I just want a simple twig solution to move inside the page. – M. Galardi Apr 13 '18 at 06:43