Access a community of over 900,000 Shopify Merchants and Partners and engage in meaningful conversations with your peers.
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?
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!