How can we sort view result, depend on cookie set or not
For any field you want to pull a value from a Cookie you add an exposed filter, here I add a contextual filter for the field, here a node-&gt;title:


Then we configure the filter to pull a value from the URL. If none is provided we define how to find the value via PHP code. This is the secret to pulling the value from a $_COOKIE value.




Then we supply a blurb of code to read the Cookie value: