How to get current URL or pathname? #2773
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
mrvectopus
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello 💟
I need to get a pathname of current page, for example if I open a page "About" I need get a url directory "/about.en" (without locale
en
it's been perfect 😄 ) and use this inconst data
for db filter.I found this solution for my page
about.en.mdx
:With this method I'm view correctly pathname in VS console
/about.en
but when I try use this data${resourceUrl}
inconst data
link (I mean result like this:.filter("group_slug", "/about.en")
) this is not work... :(Beta Was this translation helpful? Give feedback.
All reactions