Dedicated to the Hydrogen framework, headless commerce, and building custom storefronts using the Storefront API.
Hello, I've created a website using the Shopify API, and am pulling products and articles using the IDs of each element.
However, the return slug ends up being something like:
https://xxxxxx/article/Z2lkOi8vc2hvcGlmeS9BcnRpY2xlLzU1Njk3MzgxODAzOA==
is there any way to replace everything after /article/ with the handle of the item in question?
Thank you.
Hey @Ivandev15
Had you tried base 64 decoding the end of that URL? The end of it is the base 64 encoded value of the Article ID - if I window.atob it, it'll give you something like - gid://shopify/Article/12345678.
Hope that helps - let me know if I'm missing anything!