mirror of
https://github.com/getgrav/grav.git
synced 2026-02-19 13:07:54 +01:00
Never translate root page
This commit is contained in:
@@ -44,6 +44,10 @@ trait PageTranslateTrait
|
||||
*/
|
||||
public function getTranslation(string $languageCode = null, bool $fallback = null)
|
||||
{
|
||||
if ($this->root()) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
$code = $this->findTranslation($languageCode, $fallback);
|
||||
if (null === $code) {
|
||||
$object = null;
|
||||
|
||||
Reference in New Issue
Block a user