flav-allaz
(Flav Allaz)
1
Hi,
I’m searching a way to concatenate strings around a function in a template.
I’m trying to get working something like that:
{{.Include "path/to/"+(.URL.Query.Get "lang")+"/file.html"}}
eg. to include the file /path/to/en/file.html, depending on the URL Query parameter (‘lang’ in this example).
Is it possible?
Many thanks in advance.
matt
(Matt Holt)
2
flav-allaz
(Flav Allaz)
3
Thanks Matt
One possible solution:
{{.Include (print "/path/to/" (.URL.Query.Get "lang") "/file.html")}}
system
(system)
Closed
4
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.