1

I used devel to generate dummy content for a content type named recipe, and at the moment I have 10 recipes. 5 in English and 5 in Portuguese. I create a view(page view) that shows all the recipes when the user goes to /recipes, and select it to render only the recipes in English.

When I visit the url: domainname/recipes I see all the recipes including the ones in Portuguese.

Below is my configuration:

enter image description here

How do I filter out the recipes that are not in English?

UPDATED: How can I add a menu to that same view?

1 Answer 1

2

Click "Add" on "Filter Criteria" on the left column. Then add a filter called Content: Translation language and set it to Content language selected for page

3
  • So if I want to view all the contents in Portuguese I should just add another page view and also add the content translation through the filter criteria Commented Mar 11, 2020 at 13:16
  • No the idea is you just choose one value Content language selected for page and whichever language the user's browsing in, it pulls only content translated in that language. You don't need to create individual views for each language. Just configure as above and then visit yoursite.com/pt/recipes perhaps and it should show the portuguese.
    – Beebee
    Commented Mar 11, 2020 at 13:35
  • Yes you are right that I don't have to create multiple pages. If you know this: how can I add a menu to that view? Commented Mar 11, 2020 at 14:49

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.