frazap has asked for the wisdom of the Perl Monks concerning the following question:
And load a libmap.html.ep template in the ./template folder.$r->get('/libmap');
This file uses js files that are in the ./public folder.
I would add a locale in the url: ....:3000/fr/libmap, without having any other change in the path of the template or public folders,I tried
but it fails with Page not found...$r->get('/:loc/libmap')->to(template => 'libmap', loc=> 'en');
What am I missing ?
Thanks!Edit: I have a utils.js file that is searched in public/fr/utils.js folder instead of public/utils.js folder.
That were the problem is... How can I keep on with having all my js files in ./public and not in public/fr, public/en ... ?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mojolicious: Optional placeholder and template name
by trippledubs (Deacon) on May 19, 2019 at 13:13 UTC | |
by frazap (Monk) on May 21, 2019 at 10:12 UTC | |
by soonix (Chancellor) on May 21, 2019 at 10:23 UTC | |
by frazap (Monk) on May 21, 2019 at 11:43 UTC | |
by soonix (Chancellor) on May 21, 2019 at 13:22 UTC | |
by Your Mother (Archbishop) on May 21, 2019 at 14:23 UTC |