A space to discuss online store customization, theme development, and Liquid templating.
We're moving the community! Starting July 7, the current community will be read-only for approx. 2 weeks. You can browse content, but posting will be temporarily unavailable. Learn more
I'm creating an app that uses app extension blocks. The app has several blocks that a store can apply to page, where each block loads specific data from our servers (like help pages, etc). Rather than forcing each store to create a separate page for each block that they want to use, is it possible to have them create one page, assign one block to that page, but have multiple urls point to that single page.
For example, have these urls all point to the single url -> /pages/help-app/index, /pages/help-app/how-would-i-xxx, /pages/help-app/how-to-create-xxx, etc. but all of those urls point to the single page configured with my app's extenstion -> /pages/help-app. i could then read the url to determine which subpage they are trying to load and pull in that information from our server.
Hi Sancuscommerce,
In Shopify, each URL corresponds to a unique page. You cannot have multiple URLs point to the same page. However, there are a couple of ways you can use dynamic content on the page based on URL parameters.
For example, you could have a URL like /pages/help-app?topic=how-would-i-xxx. Your block could then read this 'topic' parameter from the URL and load the appropriate content. This way, you can have different content on the same page depending on the URL parameters.
Another way would be using URL rewriting. You would need to use a reverse proxy server or a service like Cloudflare to rewrite incoming URLs to point them to the same page.
Liam | Developer Advocate @ Shopify
- Was my reply helpful? Click Like to let me know!
- Was your question answered? Mark it as an Accepted Solution
- To learn more visit Shopify.dev or the Shopify Web Design and Development Blog