Active url
#1043
Replies: 1 comment 1 reply
-
Context (ctx) doesn't have an option for getting the current path, but you can pass the current path into the template from the handler by using something like: currentPath:=request.URL.Path It will depend on which backend you're using though, for Echo for example it would be more like: currentPath:=c.Request().URL.Path The |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm currently using the alpinejs and to add active class to my link I'm using this code
Is it somehow possible to get path using templ with ctx or something
Beta Was this translation helpful? Give feedback.
All reactions