Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

How to get only translated pages in collection?

Solved by Javi View solution

Started by Javi 8 years ago · 5 replies · 868 views
8 years ago

Hi all!

Is possible get only the translated pages in collections? I have a lot of posts that not are translated in english but in the english collection page (Blog) they appears in the default lang (Spanish)

Thanks

8 years ago

@javiregpa Not sure if this will do what you want, but I recall the following related setting in '/user/config/system.yaml':

YAML
languages:
  translations_fallback: true     # Fallback through supported translations if active lang doesn't exist

Try setting it to false and see if it works.

8 years ago

@pamtbaau:
all the following related setting i

hI @pamtbaau

I have translations_fallback set to false, but also shows the posts although they are not translated in English.

This is my blog.en.md

YAML
---
title: News
slug: news
body_classes: blog_classic
content:
    items: '@self.children'
    limit: 10
    order:
        by: publish_date
        dir: desc
    pagination: true
    url_taxonomy_filters: false
---

# NEWS AND EVENTS
##### CORPORATE NEWS

Thanks

8 years ago Solution

I found a "solution"

Yo need to translate the page in the others languages and after set unpublished this pages, in the collection page don't appear the unpublished pages.

Thanks

👍 1
8 years ago

Nice find! Thanks for sharing your solution...

👍 1
8 years ago

Thanks for your help @pamtbaau

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 64 18 hours ago
Support · by Anna, 3 days ago
2 68 20 hours ago
Support · by Justin Young, 21 hours ago
1 35 21 hours ago
Support · by Duc , 1 week ago
2 71 6 days ago
Support · by Colin Hume, 1 week ago
2 63 6 days ago