Skip to main content

How we can assign the values from javascript to Nation builder Variables ?

How we can assign the values from javascript to Nation builder Variables ? For example

I have following Script in my code :

 

<script>
var url = document.write(document.URL);
</script>

So In Example I want to assign URL to Liquid mark up variable .

like :

<script>
var url = document.write(document.URL);


</script>

Please Help Me !

Official response from

You can use the following Liquid to produce the desired result of a full URL:

{% capture fullurlofpage } http://yournationslug.nationbuilder.com{{ request.url_path }} {% endcapture }

The liquid output of {{ fullurlofpage }} will now produce the URL of the page.

Share this post

Showing 2 reactions

How would you tag this suggestion?
Please check your e-mail for a link to activate your account.