in reply to Re^2: Mojolicious absolute url with query in template?
in thread Mojolicious absolute url with query in template?

You don't give any argument to ->query(), so the query part is empty. If you want query parameters, you have to give them to the method, like haukex already demonstrated.

<a href="<%= url_for('/')->to_abs->query( foo => 'bar' )%>"> Reload </ +a>

If you want to keep the current query parameters, you need to pass those into your template.

Replies are listed 'Best First'.
Re^4: Mojolicious absolute url with query in template?
by haukex (Archbishop) on Mar 19, 2020 at 09:48 UTC