0

I have created a view (/page_view), which displays two content types.

This view contains a contextual filter for user to be able to see only one particular content type (/page_view/content_type_1 and /page_view/content_type_2).

But in my case the user by typing for example /page_view/content_type_3 is able to see other content types which should not be included into the current view.

How can I restrict a view to display only 2 content types?

1

Sounds like you need to set a filter type as well instead of just your contextual filters. So under filters choose "Content Type" and choose ONLY the content types you wish the user to see. Then the contextual filter set it to "No results found" (see screen shots)

enter image description here enter image description here

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.