Re: Render an App Block directly in a template

Render an App Block directly in a template

wmeligy
Shopify Partner
5 1 3

We can not really convert a section in a third party theme to a dynamically rendered section with app block support ( the section does have more than one block of an autofill setting, which is not supported as per this link)

 

Instead, can we render an app block directly without using the theme editor support? example:

{% render '@app/xxxxx/embed/' %}
Replies 2 (2)

Liam
Shopify Staff
2873 312 821

Hi there Wmeligy,

 

Thanks for getting in touch - just to confirm is your extension an app block or an app embed block? If the former, you could use a deep link, that merchants can use following installation, to activate the app embed block automatically - without needing to interact with the theme editor. Otherwise if your extension is an app block, merchants will need to add this to a section (or create a new section) on the theme editor. Is there a specific issue with a third-party theme that you're running into? It would be great to learn more about your specific use case.

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

wmeligy
Shopify Partner
5 1 3

Hello,

The problem is the limitation for using App blocks in a section, namely The limitation of not having more than one setting of the same type in a section rendering app blocks ( as mentioned  here ).


This is stopping us from adding an app block in place ( real life example: A theme has two 'link_list' types in header section for mobile and normal navigation, that stops us from adding an app block in header ).

That is why as an alternative, we wanted to check if we can directly include the app block in place, without having to copy the whole code of the block in a theme specific snippet.

Thank you for your reply and time