Deep linking into the Contact page theme template for adding a custom App Block

Hey Shopify app devs… hoping to get some help on an issue I’m working on, specifically related to deep linking from my app into the theme editor, where I can add an App Block to a theme template. I’m following this guide: https://shopify.dev/docs/apps/online-store/theme-app-extensions/extensions-framework#app-block-deep-link-query-parameters.

This works fine for certain templates, (i.e. I am able to deep link into the Customer account template to add my App Block). For this I am using the following URL:

/admin/themes/current/editor?template=customers/account&target=newAppsSection&addAppBlockId=[MY_THEME_ID]/my_app_block

This works.

I’m looking to do the same thing with the default Contact page template, but am not able to figure out what this deep link url should be. I tried the following, but it did not work for me:

/admin/themes/current/editor?template=pages/contact&target=newAppsSection&addAppBlockId=[MY_THEME_ID]/my_app_block

My guess is my value for the template query param is wrong, but not finding any details on how to actually do this.

Any ideas or suggestions would be appreciated… :call_me_hand:

Hey @agrohs !

The JSON template to which the app block should be added. If not set, then Shopify will default to the index.json template.

Just tried this and had success with ?template=page.contact (theme has a page.contact.json template).

Let me know how you go!

1 Like

Thanks so much @SBD , thank worked great!!

1 Like