Grav 1.7: Fixed prev/next page missing pages if pagination was turned on in page header

This commit is contained in:
Matias Griese
2019-10-03 15:16:11 +03:00
parent a75c0cbe62
commit ffa9ef6a7e
2 changed files with 5 additions and 1 deletions

View File

@@ -7,6 +7,7 @@
* Support customizable null character replacement in `CSVFormatter::decode()`
1. [](#bugfix)
* Fixed wrong Grav param separator when using `Route` class
* Grav 1.7: Fixed prev/next page missing pages if pagination was turned on in page header
# v1.7.0-beta.9
## 09/26/2019

View File

@@ -2032,7 +2032,7 @@ class Page implements PageInterface
$this->path = dirname($var, 2);
}
return $this->path . '/' . $this->folder . '/' . ($this->name ?: '');
return rtrim($this->path . '/' . $this->folder . '/' . ($this->name() ?: ''), '/');
}
/**
@@ -2602,6 +2602,9 @@ class Page implements PageInterface
throw new \InvalidArgumentException('Argument should be either header variable name or array of parameters');
}
if (!$pagination) {
$params['pagination'] = false;
}
$context = [
'pagination' => $pagination,
'self' => $this