Skip to main content
AI Assist is now on Stack Overflow. Start a chat to get instant answers from across the network. Sign up to save and share your chats.
URL of Twig has changed from sensiolabs to symfony.
Source Link
bobbel
  • 3.4k
  • 2
  • 28
  • 44

This should work fine:

{{ 'http://' ~ app.request.host }} 

To add a filter - like 'trans' - in the same tag use

{{ ('http://' ~ app.request.host) | trans }} 

As Adam Elsodaney points out, you can also use string interpolationstring interpolation, this does require double quoted strings:

{{ "http://#{app.request.host}" }} 

This should work fine:

{{ 'http://' ~ app.request.host }} 

To add a filter - like 'trans' - in the same tag use

{{ ('http://' ~ app.request.host) | trans }} 

As Adam Elsodaney points out, you can also use string interpolation, this does require double quoted strings:

{{ "http://#{app.request.host}" }} 

This should work fine:

{{ 'http://' ~ app.request.host }} 

To add a filter - like 'trans' - in the same tag use

{{ ('http://' ~ app.request.host) | trans }} 

As Adam Elsodaney points out, you can also use string interpolation, this does require double quoted strings:

{{ "http://#{app.request.host}" }} 
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link
URL Rewriter Bot
URL Rewriter Bot

This should work fine:

{{ 'http://' ~ app.request.host }} 

To add a filter - like 'trans' - in the same tag use

{{ ('http://' ~ app.request.host) | trans }} 

As Adam Elsodaney points outAdam Elsodaney points out, you can also use string interpolation, this does require double quoted strings:

{{ "http://#{app.request.host}" }} 

This should work fine:

{{ 'http://' ~ app.request.host }} 

To add a filter - like 'trans' - in the same tag use

{{ ('http://' ~ app.request.host) | trans }} 

As Adam Elsodaney points out, you can also use string interpolation, this does require double quoted strings:

{{ "http://#{app.request.host}" }} 

This should work fine:

{{ 'http://' ~ app.request.host }} 

To add a filter - like 'trans' - in the same tag use

{{ ('http://' ~ app.request.host) | trans }} 

As Adam Elsodaney points out, you can also use string interpolation, this does require double quoted strings:

{{ "http://#{app.request.host}" }} 
added another user's correct answer to complete this answer for reference.
Source Link
NDM
  • 6.8k
  • 3
  • 42
  • 55

This should work fine:

{{ 'http://' ~ app.request.host }} 

To add a filter - like 'trans' - in the same tag use

{{ ('http://' ~ app.request.host) | trans }} 

As Adam Elsodaney points out, you can also use string interpolation, this does require double quoted strings:

{{ "http://#{app.request.host}" }} 

This should work fine:

{{ 'http://' ~ app.request.host }} 

To add a filter - like 'trans' - in the same tag use

{{ ('http://' ~ app.request.host) | trans }} 

This should work fine:

{{ 'http://' ~ app.request.host }} 

To add a filter - like 'trans' - in the same tag use

{{ ('http://' ~ app.request.host) | trans }} 

As Adam Elsodaney points out, you can also use string interpolation, this does require double quoted strings:

{{ "http://#{app.request.host}" }} 
Just pointing out the commentary so that people see it right away
Source Link
Loading
Source Link
Alessandro Desantis
  • 14.4k
  • 1
  • 29
  • 33
Loading