Skip to content

Releases: DivanDesign/EvolutionCMS.snippets.ddRunSnippets

Version 4.1.1

14 Apr 11:33
Compare
Choose a tag to compare
  • * Parameters → outputterParams->tpl: Snippet placeholders will be replaced even with empty results.
  • * \ddTools::getTpl is used instead of $modx->getTpl (means a bit less bugs).
  • * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.60 is required.

Version 4.1

03 May 22:28
Compare
Choose a tag to compare
  • + Parameters → snippets->{$snippetName}->runParams->cache:
  • + Parameters → snippets->{$snippetName}->runParams->parseResultCompletely: The new parameter. Allows to completely parse result of required snippet by CMS parser.
  • * Parameters → snippets_parseEachResultCompletely: Has been renamed from snippets_parseResults (with backward compatibility).
  • * Attention! PHP >= 7.4 is required.

Version 4.0

30 Mar 00:43
Compare
Choose a tag to compare
  • * Attention! Backward compatibility is broken.
  • * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.59 is required.
  • * \DDTools\Snippet::runSnippet is used instead of $modx->runSnippet to run snippets without DB and eval. This increases performance and saves server resources, but unfortunately you can't run snippets that do not use \DDTools\Snippet. Please give us feedback via Telegram chat if this is critical.
  • + Any executed snippet can return either a string or a native PHP array. It is convenient to use with “nested” placeholders (see README → Examples).
  • * Parameters → outputterParams:
    • * The following parameters have been renamed (with backward compatibility):
      • * tploutputterParams->tpl.
      • * tpl_placeholdersoutputterParams->placeholders.
    • * outputterParams->tpl:
      • + Placeholders → [+ddRunSnippetsResult.all+]: The new placeholder. Contains results of all executed snippets combined by ''.
      • * Default value: Has been changed to '' (all snippets will be executed but nothing will be returned).
    • - outputterParams->placeholders: The outdated parameter name placeholders is no longer supported.
  • * README:
    • + Parameters description: Additional subheadings have been added.
    • * Examples:
      • + Some additional comments have been added.
      • * HJSON is used for all examples.
    • + Links → GitHub.

Version 3.4

30 Apr 08:05
Compare
Choose a tag to compare
  • + Conversion to JSON and back is not used for nested objects anymore, recursion is used instead. So, you don't have to care about correct JSON format in result of each snippet when placeholders are used in object-values of parameters in any depth.

Version 3.3

29 Apr 17:38
Compare
Choose a tag to compare
  • * Attention! PHP >= 5.6 is required.
  • * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.49.1 is required.
  • + Parameters:
    • + snippets_parseResults: The new parameter. Adds the ability to parse result of each snippet by CMS parser.
    • + snippets, tpl_placeholders: 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).
  • + \ddRunSnippets\Snippet: The new class. All snippet code was moved here.
  • + README:
    • + Documentation → Installation → Using (MODX)EvolutionCMS.libraries.ddInstaller.
    • + Links.
  • + Composer.json → support.

Version 3.2

03 Jun 10:20
Compare
Choose a tag to compare
  • * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.38.1 is required.
  • + Parameters → snippets->{$snippetName}->{$paramName}: Placeholders of previous snippet executions results also works in object-values of parameters in any depth.
  • * Refactoring.
  • + README → Documentation → Examples → Pass objects and arrays as snippet params.

Version 3.1.1

21 May 20:23
Compare
Choose a tag to compare
  • * Parameters → tpl_placeholders:
    • * Renamed from placeholders (with backward compatibility).
    • * Truly supports JSON and QueryString.

Version 3.1

13 May 22:40
Compare
Choose a tag to compare
  • + Parameters → snippets->{$snippetName}->{$paramName}: As opposed to standard CMS calling you can pass not only string parameters to the snippet, any types are supported.

Version 3.0

13 May 03:13
Compare
Choose a tag to compare
  • * Attention! Backward compatibility is broken.
  • * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.35.1 is required (not tested in older versions).
  • * The snippet completely revised, see README.
  • + README → Documentation → Examples.

Version 2.5.1b

13 May 00:34
Compare
Choose a tag to compare
  • * Attention! (MODX)EvolutionCMS.libraries.ddTools >= 0.16.1 is required.
  • * Compatibility with the new (MODX)EvolutionCMS.libraries.ddTools.
  • * Minor changes.