Hello Everybody

I want to know how to pass a session variable or cookie to a views filter,
So that views should be automatically select the correct filtering option using session variable.

Thanks in advance

Comments

Eugene Fidelin’s picture

Priority: Normal » Critical

I have the same question, because i want to store exposed filters in session. This will give users an opportunity not to enter filter when they navigate to view page next time.

catch’s picture

Version: 5.x-1.5 » 6.x-2.x-dev
Category: support » feature
Priority: Critical » Minor
merlinofchaos’s picture

Version: 6.x-2.x-dev » 5.x-1.6
Status: Active » Fixed

This is something you'd do in the argument handling code section.

You could do something like: $view->filters[3]['value'] = $_SESSION['my_stored_value'];

Note that this will only set the default for the exposed filter if you have the right option checked in the exposed filters.

Eugene Fidelin’s picture

Thanx to merlinofchaos

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.