1

I have created a view with exposed filter, i need to print it in different position, for example filter will be in next to many & view will be in the content container. Gone through some forum, nothing seems to be working from my end. With the code below i got view array but no sure how to print the exposed filter.

$view = views_get_view('watchlist');
$view->set_display('default');
print_r($view);
5

Are you trying to display it in a different region? Views has an option for that. When you have one or more exposed filters, you'll find an EXPOSED FORM option in the advanced tab that will allow you to detach the form and display it in a block.

From there you can place it anywhere just like a regular block.

Exposed form as a block

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.