Используйте ветку для фильтрации переменной по URL-адресуPhp

Кемеровские программисты php общаются здесь
Anonymous
Используйте ветку для фильтрации переменной по URL-адресу

Сообщение Anonymous »


I have a variable {{ name }} which outputs Treatment & Support. I need to remove the & symbol and convert the name into a useable url slug with twig for example: treatment-support.

I have having trouble finding the correct twig fitlers. I am looking at I am looking at http://twig.sensiolabs.org/documentation. So far all I have is

{{ name |lower }}

To reiterate I need to use twig to turn Treatment & Support into treatment-support using the {{ name }} variable.

Any help is appreciated.


Источник: https://stackoverflow.com/questions/374 ... e-into-url

Вернуться в «Php»