diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f1b8ca..5323ae8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,15 @@ # (MODX)EvolutionCMS.snippets.ddGetDocuments changelog +## Version 1.7 (2024-10-06) + +* \+ Outputters → Json → Parameters: + * \+ `outputterParams->templates->{$docFieldName}` → Placeholders → `[+itemNumber+]`, `[+itemNumberZeroBased+]`: The new placeholders. + * \+ `outputterParams->docFields[i]`: Added ability to use custom aliases instead of field names for output using the `'='` separator, for example: `'pagetitle=title'`, `'content=text'`, etc. (see README → Examples). +* \* `\ddTools::getTpl` is used instead of `$modx->getTpl` (means a bit less bugs). +* \* Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.62 is required. + + ## Version 1.6 (2022-09-30) * \+ Outputters → Json → Parameters → `outputterParams->templates->{$docFieldName}` → Placeholders: The new placeholders contain any document field name or TV specified in `outputterParams->docFields`. diff --git a/CHANGELOG_ru.md b/CHANGELOG_ru.md index 4ae4154..50a65a1 100644 --- a/CHANGELOG_ru.md +++ b/CHANGELOG_ru.md @@ -1,6 +1,15 @@ # (MODX)EvolutionCMS.snippets.ddGetDocuments changelog +## Версия 1.7 (2024-10-06) + +* \+ Outputters → Json → Параметры: + * \+ `outputterParams->templates->{$docFieldName}` → Плейсхолдеры → `[+itemNumber+]`, `[+itemNumberZeroBased+]`: Новые плейсхолдеры. + * \+ `outputterParams->docFields[i]`: Добавлена возможность использовать кастомные псевдонимы вместо имён полей для вывода, используя разделитель `'='`, например: `'pagetitle=title'`, `'content=text'`, etc. (см. README → Примеры). +* \* `\ddTools::getTpl` используется вместо `$modx->getTpl` (стало чуть меньше багов). +* \* Внимание! Требуется (MODX)EvolutionCMS.libraries.ddTools >= 0.62. + + ## Версия 1.6 (2022-09-30) * \+ Outputters → Json → Параметры → `outputterParams->templates->{$docFieldName}` → Плейсхолдеры: Новые плейсхолдеры. Содержат значения полей документа (и TV), указанных в `outputterParams->docFields`. diff --git a/README.md b/README.md index 5f285ea..2e76024 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ require_once( #### 1. Elements → Snippets: Create a new snippet with the following data 1. Snippet name: `ddGetDocuments`. -2. Description: `1.6 A snippet for fetching and parsing resources from the document tree or custom DB table by a custom rule.`. +2. Description: `1.7 A snippet for fetching and parsing resources from the document tree or custom DB table by a custom rule.`. 3. Category: `Core`. 4. Parse DocBlock: `no`. 5. Snippet code (php): Insert content of the `ddGetDocuments_snippet.php` file from the archive. diff --git a/composer.json b/composer.json index af2e1b6..48db47b 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "dd/evolutioncms-snippets-ddgetdocuments", "type": "modxevo-snippet", - "version": "1.6.0", + "version": "1.7.0", "description": "A snippet for fetching and parsing resources from the document tree or custom DB table by a custom rule.", "keywords": [ "modx", diff --git a/ddGetDocuments_snippet.php b/ddGetDocuments_snippet.php index ad2ae4e..c6aee36 100644 --- a/ddGetDocuments_snippet.php +++ b/ddGetDocuments_snippet.php @@ -1,13 +1,13 @@ 'outputFormat',