Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

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 34

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.