Releases: DivanDesign/EvolutionCMS.snippets.ddGetDocuments
Releases · DivanDesign/EvolutionCMS.snippets.ddGetDocuments
Version 1.8
- + Outputters → Json → Parameters:
- +
outputterParams->templates->noResults
: The new optional parameter. Allows to specify a chunk or text to output when no items found. - +
outputterParams->templates->wrapper
: The new optional parameter. Allows to specify a wrapper template.
- +
- * Providers → Select → Parameters →
providerParams->ids
: If the required parameter is empty, nothing will be returned.
Version 1.7
- + 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
- + Outputters → Json → Parameters →
outputterParams->templates->{$docFieldName}
→ Placeholders: The new placeholders contain any document field name or TV specified inoutputterParams->docFields
. - * Outputters → Yandexmarket: Critical error related to missing initialization of an object field has been fixed.
Version 1.5
- + Parameters →
providerParams->groupBy
: The new parameter. Allows to group items that have the same field values into summary item (like SQLGROUP BY
). See README. - * README → Examples: HJSON is used for all examples.
Version 1.4
- * Attention! PHP >= 5.6 is required.
- * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.50 is required.
- + Parameters →
providerParams
,outputterParams
,extendersParams
: Can also be set as HJSON or as a native PHP object or array (e. g. for calls through$modx->runSnippet
). - + You can just call
\DDTools\Snippet::runSnippet
to run the snippet without DB and eval (see README → Examples). - + Outputters → Json → Parameters →
outputterParams->templates
: The new parameters. You can use templates for some document fields. - * Outputters → String → Parameters →
outputterParams->templates
: The following parameters moved here (with backward compatibility):- *
outputterParams->itemTpl
→outputterParams->templates->item
. - *
outputterParams->itemTplFirst
→outputterParams->templates->itemFirst
. - *
outputterParams->itemTplLast
→outputterParams->templates->itemLast
. - *
outputterParams->wrapperTpl
→outputterParams->templates->wrapper
. - *
outputterParams->noResults
→outputterParams->templates->noResults
.
- *
- * Outputters → Sitemap → Parameters →
outputterParams->templates
: The following parameters moved here (with backward compatibility):- *
outputterParams->itemTpl
→outputterParams->templates->item
. - *
outputterParams->wrapperTpl
→outputterParams->templates->wrapper
.
- *
- + README → Documentation → Installation → Using (MODX)EvolutionCMS.libraries.ddInstaller.
- + Composer.json.
- +
support
. - +
authors
: Added missed authors.
- +
Version 1.3.1
- * Outputters → String → Parameters →
outputterParams->placeholders
: Fixed critical error when the parameter is used.
Version 1.3
- * Attention! (MODX)Evolution.libraries.ddTools >= 0.42 is required.
- * Parameters: The following parameters were moved from Snippet to Provider (with backward compatibility):
- *
filter
→providerParams->filter
. - *
offset
→providerParams->offset
. - *
total
→providerParams->total
.
- *
- * Outputters → Yandexmarket:
- * Fixed smart name and price preparation.
- * Parameters: Structure was changed, added an additional nesting level for
shopData
,offerFields
andtemplates
(with backward compatibility). - + Added the ability to disable escaping special characters (
'
,"
,&
,<
,>
) in the field value (seeoutputterParams->offerFields->{$fieldName}->disableEscaping
). - + Also you can set a custom string that will be added before or after the field value (see
outputterParams->offerFields->{$fieldName}->valuePrefix
andoutputterParams->offerFields->{$fieldName}->valueSuffix
).
- + Added the ability to run snippet without DB requests and PHP
eval
:\DDTools\Snippet::runSnippet([ 'name' => 'ddGetDocuments', 'params' => $params ]);
- + README:
- + Parameters description → Extenders parameters →
extendersParams->{$extenderName}
. - + Links → Packagist.
- + Parameters description → Extenders parameters →
Version 1.2
- + Extenders → SortFromURL (see README).
- * Parameters: The following were changed (with backward compatibility):
- -
orderBy
. - +
providerParams->orderBy
.
- -
- * Refactoring.
- + README:
- + Examples.
- + Links.
Version 1.1
- * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.40.1 is required (not tested in older versions).
- * Improved compatibility with new versions of (MODX)EvolutionCMS.libraries.ddTools.
- * Snippet:
- +
extendersParams->pagination->wrapperTpl
: The new placeholder[+totalPages+]
. - * Small refactoring.
- +
- *
\ddGetDocuments\DataProvider\DataProvider::prepareQueryData
: TVs default values are used (#6). - *
\ddGetDocuments\Outputter\Json\Outputter::parse
: Removed unused variable. - + README, CHAGNELOG: Style improvements.
- * Composer.json:
- +
homepage
. - +
authors
. - *
name
: Renamed asevolutioncms-snippets-ddgetdocuments
fromdd/modxevo-snippet-ddgetdocuments
. - *
require
:→dd/evolutioncms-libraries-ddtools
: Renamed fromdd/modxevo-library-ddtools
.
- +
Version 1.0
- * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.30 is required.
- + Providers → Customdbtable. Get resources from custom DB table.
- * Outputters → Yandexmarket:
- + Added the following parameters:
- +
outputterParams->shopData_platform
- +
outputterParams->shopData_version
- +
- + Offer
priceOld
will be used ifprice
is empty. - + Offer
pagetitle
will be used ifname
is empty. - +
0
weight is not displayed because it's invalid.
- + Added the following parameters:
- * Extenders → Pagination:
- *
extendersParams->pagination->currentPageTpl
: Fixed empty href on default value.
- *
- * Snippet:
- * Empty
extenders
parameter is not used.
- * Empty
- + README:
- + Requires.
- + Documentation → Installation.
- + Documentation → Parameters description.
- + CHANGELOG.