How to get full current custom page url in liquid?

nazimkeser121
New Member
1 0 0

Hello Shopify exports,
I added new page called "support" on shopify store. ( For instance, url => store.website.com/pages/support ).
The page should be display the content of Vue app. I need to bind Vue app and liquid page.

For instance, if the url was "store.website.com/pages/support?123 and I wanted the entire URL, including the "?123".

This is custom page liquid code.

<vue-support  type="{{ url}}"> </vue-support>

{{ 'app.css' | asset_url | stylesheet_tag }}

{{ 'app.js' | asset_url | script_tag }}

<script>

var url = window.location.href;

</script>

As upi cam see from above liquid code, I need to bind "type" value with Vue app.

In script, I can get full url by window object. Then how can "url" variable bind with "type" attribue?

Best,

Nazim

0 Likes