Hi, I need some help with the Theme App Block extension liquid schema. Is there any way to dynamically reference the APP_ID
in the schema settings depending on the app? I couldn’t find a similar topic, so if this has already been asked, please send me the link.
Our company is developing an app, and we are using the Theme App Block. We have different development environments: local, development, staging, and production. We store information in a metaobject and want the user to be able to choose the correct metaobject for an app block from a set of available metaobjects. To achieve this, we use the metaobject
block type, and it has a required property called metaobject_type
, where the value is something like app--<appid>-basic-content.
The issue I have is that the is not dynamic, and this becomes a problem because each environment uses its own app with a unique ID. However, the value needs to be hardcoded in the schema, which causes complications.
Is there a solution to make this value dynamic, depending on the app, so it can work like a variable tied to the specific app, as this block works in the context of the app? Would it be possible to use something like the Admin API $app:
prefix? Perhaps I missed something in the documentation…
Creating a metaobject with a general type does not work because I need the metaobject and its definition to be deleted when the app is deleted. This is impossible if the user deletes the app because we lose API access and cannot remove it.
I would greatly appreciate any help or advice!