In my website, i am storing couple of user input values in html5 data store through JS. I don't know how to transfer the value from html5 data store to liquid so that i can use it my custom block.
Example:
1) Let's say, user enters valid city and state in a textbox and i store those two values in html5 data store (i need access to those values in other pages of my website)
- <script type="text/javascript">
- localStorage.city = "<city>";
- localStorage.state = "<state>";
- </script>
2) Now i have to use those values in my custom liquid block to get location specific results. How do i do that?
- <script type="text/javascript">
- {% customblock city:<city> state:<state> %}
- {% endcustomblock %}
- </script>