Symfony generate links for twig rendered emails sent with cron tasks -
There are some problems coming up while generating paths in the email presented with a sprig on symphony
What I'm doing here
& lt; a href = "{{domain_parameter ~ path ('news_homepage'}}}" & gt; My link & lt; / A & gt; domain_parameter: http://mydomain.com on routing
and on parameters.yml
news_homepage: pattern: / news error: {_controller: newsbundle: news: index} Then I send emails with working cronies
While doing so, I am looking at the URL like this:
http://mydomain.com/news But I'm getting this:
http://mydomain.com/website.com/web/app.php/news If I use "url" Path "with the result:
http: //localhost/var/www/website.com/web/app.php/new s Do you know how can I get to work as expected? Thank you in advance
The web / app in your link. Php should not be, so that you want to change your HTACs
If you want "just a proper domain" there, then you can try: like replace:
{{path ('news_homepage') | (* 'website.com': domain_parameter})}} In addition, the path () should be / news so that something in your configuration is wrong
Comments
Post a Comment