2

I'm building a block view that shows content related to whatever node is being viewed. It uses a contextual filter to pull the node author, and then displays content I've tagged as related. I also have a page view that has an exposed filter so the user can select an author and see all their work. I want to use the "more" link in views to take the user from the block to the filtered page of that author's work.

Since exposed filters doesn't change the URL, how can I link directly to a view with the correct filter already applied?

1 Answer 1

2

While exposed filters don't change the path, they do in fact change the url by adding the filters in there as variables. As an example, if you had a View with a page display at your/path and an exposed filter that filtered on content type, it would create this url after the exposed filter was selected:

www.example.com/your/path?type=NODETYPE

So, depending on what your exposed filter adds, you can create a link to

www.example.com/your/path/?filter=value

and go there directly. Just look in your browser afterwards and you should see it, assuming you aren't doing something fun with AJAX here anyway.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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