- + Parameters →
rowTpl→ Available placeholders:- +
[+allColumnValuesObjectJson+]: The new placeholder. Contains values of all columns as a JSON object, where keys are original column keys, values are values. - +
[+columnKey.nestedProperty+],[+colcolumnNumber.nestedProperty+]: The new placeholders. Contain values of nested properties, when a column value is an object.
- +
- *
\ddTools::getTplis used instead of$modx->getTpl(means a bit less bugs). - * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.62 is required.
- + Parameters →
inputString: Can also be set as a HJSON or Query formatted string. - * Parameters →
outerTpl: Placeholders[+rowY.colX+]works fine even source object has custom string keys.
- * Parameters:
- *
columns: Wrong working with the0value has been fixed. - *
colTpl: Wrong working with the empty value has been fixed.
- *
- * Parameters →
colTpl: Support of various column numbers in different rows has been improved.
- * Parameters:
- +
inputString: Supports JSON with any nesting level. - +
colTpl[$i]→ Placeholders:- +
[+columnIndex+]: The new placeholder. Contains index of the column, starts at0. - +
[+columnKey+]: The new placeholder. Contains key of the column. It is usefull for objects or associative arrays ininputString, for indexed arrays the placeholder is equal to[+columnIndex+]. - +
[+val+]: If a column value is an array/object, it will be converted to a JSON string (it is usefull ifinputStringcontains JSON with more than 2 levels of nesting).
- +
- +
rowTpl→ Placeholders:- +
[+allColumnValues+]: The new placeholder. Contains string values of all columns combined bycolGlue. See README → Examples. - +
[+columnKey+]: The new placeholders set, when columnKey is original column key. See README → Examples.
- +
- *
removeEmptyCols: Works fine even if bothrowTplandcolTplare not set.
- +
- + Parameters →
rowTpl,colTpl[i]: The new placeholder[+rowKey+]has been added (see README). - + Parameters →
colTpl[i]: The new placeholders[+total+]and[+resultTotal+]have beed added (see README).
- * Attention! PHP >= 5.6 is required.
- * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.50 is required.
- * Attention! (MODX)EvolutionCMS.snippets.ddTypograph >= 2.5 is required.
- + Parameters:
- +
placeholders: Can also be set as HJSON or as a native PHP object or array (e. g. for calls through$modx->runSnippet). - +
columns,sortBy,typography,colTpl: Can also be set as a native PHP array (e. g. for calls through$modx->runSnippet).
- +
- + You can just call
\DDTools\Snippet::runSnippetto run the snippet without DB and eval (see README → Examples). - +
\ddGetMultipleField\Snippet: The new class. All snippet code was moved here. - *
\DDTools\Snippet::runSnippetis used instead of$modx->runSnippetto run (MODX)EvolutionCMS.snippets.ddTypograph without DB and eval. - - Removed compatibility with ancient versions of (MODX)EvolutionCMS.libraries.ddTools.
- + README:
- + Documentation → Installation → Using (MODX)EvolutionCMS.libraries.ddInstaller.
- + Links.
- + Composer.json:
- +
support. - +
authors: Added missed homepages.
- +
- * Improved compatibility with new versions of (MODX)EvolutionCMS.libraries.ddTools.
- + Parameters →
inputString: Can also be a JSON object, not just an array. - * Parameters →
filter:- * “Is equal” operator changed to
==from::(with backward compatibility). - + Added “is not equal” operator (
!=). - + Added “and” condition (
&&). - + Values can be quoted.
- + Spaces, tabs and line breaks are allowed.
- * “Is equal” operator changed to
- + Composer.json.
- + README.
- + README_ru.
- + CHANGELOG.
- + CHANGELOG_ru.
- + Parameters →
placeholders:- + Added arrays support.
- + Added JSON format support.
- + Parameters →
inputString: Added JSON format support. - * The following parameters were renamed (the snippet works with the old names but they are deprecated):
- *
rowDelimiter→inputString_rowDelimiter. - *
colDelimiter→inputString_colDelimiter.
- *
- + Parameters →
outerTpl,rowTpl,colTpl: Added the ability to use inline templates in snippet call, using'@CODE:'prefix. - + Parameters →
rowTpl,colTpl: Additional data from theplaceholdersparameter are now also will be passed into row and column templates - * Parameters →
placeholders: Additional data has to be passed through the parameter must be a Query string (the old format is still supported but deprecated). - * The following parameters were renamed (the snippet works with the old names but they are deprecated):
- *
string→inputString. - *
docField→inputString_docField. - *
docId→inputString_docId.
- *
- * Refactoring: The snippet result will be returned in anyway (empty string for empty result).
- + Parameters →
colTpl:The[+rowNumber+]placeholder is now also available within column templates. - + Parameters →
rowTpl,colTpl: The new placeholder[+rowNumber.zeroBased+](index of the current row, starts at 0) was added to row and column templates. It’s very useful sometimes. - * Refactoring:
- * Column templates are processed only if they are used.
- * The
sortByandsortDirparameters are processed only if they are used. - * The
startRowandtotalRowsparameters are processed only if they are used. - * Some internal variables have been renamed.
- + Parameters →
outputFormat: The new output format typehtmlarrayhas been added. It is a one-dimensional array, which elements are completely processed rows. As witharray, it makes sense to use the parameter only withresultToPlaceholder.
- * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.11 is required.
- * The
\ddTools:sort2dArraymethod is used for sorting instead of the local function. - * The
\ddTools:getTemplateVarOutputmethod is used for getting field value instead of (MODX)EvolutionCMS.snippets.ddGetDocumentField. - * The following parameters have been renamed, also their description and order were changed:
- *
field→string. - *
getField→docField. - *
getId→docId. - *
splY→rowDelimiter. - *
splX→colDelimiter. - *
num→startRow. - *
count→totalRows. - *
colNum→columns. - *
vals→filter. - *
typographing→typography. - *
format→outputFormat. - *
glueY→rowGlue. - *
glueX→colGlue. - *
tplY→rowTpl. - *
tplX→colTpl. - *
tplWrap→outerTpl. - *
totalPlaceholder→totalRowsToPlaceholder.
- *
- * Parameters →
typography:- * Correction is no longer performed to the final result but to values individually.
- * Now takes a comma-separated list of column indexes specifying the columns to correct.
- * Parameters →
rowTpl:- * The placeholder
[+row_number+]has been renamed as[+rowNumber+]. - * The placeholders of the form
[+valX+]have been renamed as[+colX+].
- * The placeholder
- * Parameters →
outerTpl:- * The placeholder
[+wrapper+]has been renamed as[+result+]. - * The placeholders of the form
[+rowY.valX+]have been renamed as[+rowY.colX+].
- * The placeholder
- * Parameters →
resultToPlaceholder: Now takes a placeholder name instead of a boolean value. - * Minor code style and other changes.
- * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.10 is required.
- + Parameters →
tplWrap,tplY: The new placeholder[+resultTotal+]being used in the chunks holds the total number of RETURNED elements. - * Parameters →
tplWrap:- * The error because of which the placeholder
[+total+]used to be parsed correctly inside of a wrapping chunk only ifplaceholdershad been set has been eliminated. - + The placeholders of the form
[+rowY.valX+](whereY— row number,X— column number) that contains all values are available.
- * The error because of which the placeholder
- * Please note the placeholder
[+total+]that currently holds the total number of ALL elements. - * Minor code changes.
- + Parameters →
vals: Filtration of all columns is now available.
- * Values contained in the integer type columns are being compared like integers while sorting.
- * Bugfix: Undeclared variables in PHP >= 5.3.
- * Attention! (MODX)EvolutionCMS.snippets.ddGetDocumentField >= 2.4 is required.
- + Parameters →
tplWrap: The[+total+]placeholder is now available. - + Parameters →
splY,splX: Can process regular expressions. - + Parameters →
resultToPlaceholder: The snippet result can be added to a placeholder. - + Parameters →
format: The snippet can return result in array format. It is useful when the snippet is run by$modx->runSnippetor the snippet returns result to a placeholder. - - Parameters →
getPublished: The parameter has been deleted.publishedis no longer affects the result.
- + Parameters →
totalPlaceholder. The new parameter. The outputting of the total number of rows into an external placeholder has been added.
- + Parameters →
tplY: The placeholder[+total+]that is the number of all rows has been added into the chunk.
- + Parameters →
sortDir: The'REVERSE'value of the parameter has been added. Values would be returned in reverse order if the parameter equaled'REVERSE'.