mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 16:26:59 +02:00
Fix issue processwire/processwire-issues#1904
This commit is contained in:
@@ -28,7 +28,7 @@
|
|||||||
* ~~~~~
|
* ~~~~~
|
||||||
* #pw-body
|
* #pw-body
|
||||||
*
|
*
|
||||||
* ProcessWire 3.x, Copyright 2021 by Ryan Cramer
|
* ProcessWire 3.x, Copyright 2024 by Ryan Cramer
|
||||||
* https://processwire.com
|
* https://processwire.com
|
||||||
*
|
*
|
||||||
* @method string getMarkup($key = null) Render a simple/default markup value for each item #pw-internal
|
* @method string getMarkup($key = null) Render a simple/default markup value for each item #pw-internal
|
||||||
@@ -621,10 +621,16 @@ class PageArray extends PaginatedArray implements WirePaginatable {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public function __toString() {
|
public function __toString() {
|
||||||
$s = '';
|
$ids = array();
|
||||||
foreach($this as $page) $s .= "$page|";
|
if($this->lazyLoad) {
|
||||||
$s = rtrim($s, "|");
|
$items = $this;
|
||||||
return $s;
|
} else {
|
||||||
|
$items = &$this->data;
|
||||||
|
}
|
||||||
|
foreach($items as $page) {
|
||||||
|
if(!$page instanceof NullPage) $ids[] = $page->id;
|
||||||
|
}
|
||||||
|
return implode('|', $ids);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -649,7 +655,8 @@ class PageArray extends PaginatedArray implements WirePaginatable {
|
|||||||
if($out) {
|
if($out) {
|
||||||
$out = "<ul>$out</ul>";
|
$out = "<ul>$out</ul>";
|
||||||
if($this->getLimit() && $this->getTotal() > $this->getLimit()) {
|
if($this->getLimit() && $this->getTotal() > $this->getLimit()) {
|
||||||
$pager = $this->wire('modules')->get('MarkupPagerNav');
|
/** @var MarkupPagerNav $pager */
|
||||||
|
$pager = $this->wire()->modules->get('MarkupPagerNav');
|
||||||
$out .= $pager->render($this);
|
$out .= $pager->render($this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -729,5 +736,3 @@ class PageArray extends PaginatedArray implements WirePaginatable {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user