From 2a5afa18090e87c0a0d44c2c0c2a37b47f5934fa Mon Sep 17 00:00:00 2001 From: Ilyas Ronef Date: Mon, 22 Jun 2020 12:52:36 +0300 Subject: [PATCH] + `extendersParams->pagination->wrapperTpl`: The new placeholder `[+totalPages+]`. --- README.md | 1 + src/Extender/Pagination/Extender.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5a4f321..5a55011 100644 --- a/README.md +++ b/README.md @@ -569,6 +569,7 @@ Output in [YML format](https://yandex.ru/support/partnermarket/export/yml.html). * `[+previous+]` — HTML code of navigation block to the previous page (see parameters description below). * `[+next+]` — HTML code of navigation block to the next page (see parameters description below). * `[+pages+]` — HTML code of pages navigalion block (see parameters description below). + * `[+totalPages+]` — Total number of pages. * Valid values: * `stringChunkName` * `string` — use inline templates starting with `@CODE:` diff --git a/src/Extender/Pagination/Extender.php b/src/Extender/Pagination/Extender.php index 1241432..eae7086 100644 --- a/src/Extender/Pagination/Extender.php +++ b/src/Extender/Pagination/Extender.php @@ -112,7 +112,7 @@ public function applyToSnippetParams($snippetParams){ /** * applyToOutput - * @version 1.1.9 (2020-03-11) + * @version 1.2 (2020-06-22) * * @param $dataProviderOutput {\ddGetDocuments\DataProvider\DataProviderOutput} * @@ -236,7 +236,8 @@ public function applyToOutput(DataProviderOutput $dataProviderOutput){ , 'totalPages' => $pagesTotal ] - ])) + ])), + 'totalPages' => $pagesTotal ] ])); }