Skip to content

Commit

Permalink
Prerelease
Browse files Browse the repository at this point in the history
  • Loading branch information
Ronef committed Oct 6, 2024
1 parent aff9381 commit e298c1c
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 5 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG_ru.md
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ require_once(
#### 1. Elements → Snippets: Create a new snippet with the following data

1. Snippet name: `ddGetDocuments`.
2. Description: `<b>1.6</b> A snippet for fetching and parsing resources from the document tree or custom DB table by a custom rule.`.
2. Description: `<b>1.7</b> 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.
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions ddGetDocuments_snippet.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?php
/**
* ddGetDocuments
* @version 1.6 (2022-09-30)
* @version 1.7 (2024-10-06)
*
* @see README.md
*
* @link https://code.divandesign.ru/modx/ddgetdocuments
*
* @copyright 2015–2022 Ronef {@link https://Ronef.me }
* @copyright 2015–2024 Ronef {@link https://Ronef.me }
*/

// Include (MODX)EvolutionCMS.libraries.ddTools
Expand Down
2 changes: 1 addition & 1 deletion src/Snippet.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

class Snippet extends \DDTools\Snippet {
protected
$version = '1.6.0',
$version = '1.7.0',

$renamedParamsCompliance = [
'outputter' => 'outputFormat',
Expand Down

0 comments on commit e298c1c

Please sign in to comment.