Using Theme/Settings Variables in custom "Page"

Highlighted
Tourist
5 1 2

Hi all,

 

I want to include a custom "page" as a rich text section on my Shopify store's homepage.  This custom page will include javascript that will call to another server I own to return HTML to inject into the Shopify home page.

 

I've got this all set up and working just fine, but my problem is that I need to store my server's URL somewhere and have the page use the stored URL variable to make the call, for obvious reasons like if my server's URL ever changes.  I don't want to have to manually update a URL string in a bunch of custom pages when that happens, just change the variable in settings_data.json or whatever and call it a day.

 

For all other liquid templates I can access the theme's settings_data.json file just fine, so I can just do {{ settings.backend_url }} and we're golden.  It doesn't look like custom pages have access to these settings (why not?) so I was hoping the community could point me in the direction of something that might work better.

 

Please let me know if you need more information, thank you!

0 Likes