Can app block deep linking work with draft themes or theme IDs?

Can app block deep linking work with draft themes or theme IDs?

strategicsystem
Shopify Partner
8 0 1

Should app block deep linking work with draft themes or by using a theme id?

 

I can get the deep link to work if I use "current" in the url but using a theme id does not seem to work. I believe this 

 

WORKING:

 

https://<storeurl>.myshopify.com/admin/themes/current/editor?template=cart&addAppBlockId=<blockid>/<handle>

 

 


NOT WORKING:

 

https://<storeurl>.myshopify.com/admin/themes/234234234234/editor?template=cart&addAppBlockId=<blockid>/<handle>

 

 

Is there some other way to deep link to a theme by id?

Reply 1 (1)

strategicsystem
Shopify Partner
8 0 1

So i seem to have found a partial solution.

If i add a url parameter "previewPath" it seems to work. 

 

This is find for cart page but if i want to install an app block to a product page this url parameter requires a product slug as well. 

 

Example:

Works fine for cart page:

previewPath=%2Fcart

 

Doesnt work on a product page:

previewPath=%2Fproducts

 

Works on a product page but not possible as i don't know a product to preview with in a random store.

previewPath=%2Fproducts%2Fpizza

 

Is there some value i can include that indicates first product found or something?