App block deep link - open theme editor in specific preview page

App block deep link - open theme editor in specific preview page

Shaibt
Shopify Partner
34 1 33

The structure of creating a deep link to allow online store admins to add an app block/section to a theme template is clear (documented here).

 

However, when the link is clicked the theme editor will open the required template (for example: 'default product') but the preview pane will show a random page for that template (for example: random product).

Is there a way to set the 'previewPage' query param to force the theme editor preview to open to a specific page when deep linking to enable an app block/section?

Simply adding the 'previewPage' param to the deep link did not work:

https://<myshopifyDomain>/admin/themes/current/editor?template=${template}&addAppBlockId={uuid}/{handle}&target=newAppsSection&previewPath=%2Fproducts%2Fsome-product-handle

 

 

Reply 1 (1)

fhollste
Shopify Partner
2 0 0

Did you find a solution? I am also facing this issue. previewPath gets overwritten in the deep link.