Skip to main content

Request variable genrate same out put if user is not logged in .

BY Using Request.URL . You are unable to get actual url . Like

YourNation.com/PageSlug?ID=10

First time when you Open this page it will show you /PageSlug?ID=10

But second time if you change YourNation.com/PageSlug?ID=15
Then if you refresh the page its shows you same result /PageSlug?ID=10

It will happened only when you are not logged in or your browsers cookies are disabled .

 

But i want to get Complete URL . Please Help Me !

Official response from

Place the following in layout.html to have a Liquid Output for a full URL on any page of your site:

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

Once you've placed the above code in layout.html, you can use the Liquid Output of {{ fullurlofpage }} on any page to call on a full URL of the current 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.