Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Get $1 route value regex on twig template file

Started by NicolasG 🇫🇷 5 years ago · 0 replies · 722 views
5 years ago

Hello,

I would like to get the $1 $2 regex values of my route directly into my twig template. Is this possible ?

i.e :

TWIG
// routes
 /annonce-.+-(\d+) : /annonce

// annonce.html.twig

{% do getInfos( my_digit_value) %}

Thx

Suggested topics

Topic Participants Replies Views Activity
Themes & Styling · by MarkP, 2 weeks ago
3 193 2 weeks ago
Themes & Styling · by TomW, 2 weeks ago
0 111 2 weeks ago
Themes & Styling · by themetman, 3 weeks ago
1 206 3 weeks ago
Themes & Styling · by AH, 1 month ago
1 324 3 weeks ago
Themes & Styling · by Bruno, 4 years ago
6 1523 3 weeks ago