Open wdebusschere opened 1 month ago
Return ['robotsIndex' => false]
from the computed content: https://plugins.andkindness.com/seo/docs/advanced/computed if the language is unpublished.
@tobimori We tried that, but it doesn't work because the $lang is always NULL. public function metaDefaults(string $lang = null): array dump the $lang it's always NULL..
Try this instead: https://getkirby.com/docs/reference/objects/cms/languages/current
@tobimori can you elaborate?
Try kirby()->languages()->current() instead
@tobimori no luck with this.. does this work for you? I see in our other sites that in the custom models the language is never passed, used..
Does kirby()->language()->code() work?
@tobimori
kirby()->language()->code() gives the active language code, but this is not enough Example we create a templatePage. English page Services has the boolean Published true Dutch page Services has the boolean Published false. The sitemap will onlyuse the default language of the templatePage The same for the alternate urls, in english it gives them all (does not check for each language the template)
<link href="https://www.domain.be/cs/services" hreflang="cs" rel="alternate">
<link href="https://www.domain.be/en/services" hreflang="en" rel="alternate">
<link href="https://www.domain.be/nl/services" hreflang="nl" rel="alternate"> => Should not be here
<link href="https://www.domain.be/en/services" hreflang="x-default" rel="alternate">
In dutch no alternate links..
@tobimori Any update on this?
nope, let me re-open
@tobimori Can you simulate it?
It needs changes to the plugin and is currently not possible.
Any timing from your side?
No time to work on this in the near future except if development is funded, too much client work right now.
Main language: EN, Other languages: FR, NL => NL is We have a multi language setup and we use an extra toggle field to set the page published or not.
What would be the best way to tune this to work for the plugin. Example English page Projects, only exists in EN, not in the other language.. (content is not translated), but the plugin will automatically create the rel="alternate" for each language and also in the sitemap.