Skip to content
This repository has been archived by the owner on Nov 21, 2017. It is now read-only.

Commit

Permalink
Update to 2.0.6
Browse files Browse the repository at this point in the history
- Snippet: All snippet properties are available as placeholders in the snippet chunks
  • Loading branch information
Jako committed Jan 25, 2016
1 parent db4c27e commit d509e23
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
History
================================================================================
- 2.0.6 January 25, 2016
- Snippet: All snippet properties are available as placeholders in the snippet chunks

- 2.0.5 August 24, 2015
- CustomTV: Bugfix for select dropdowns in Firefox

Expand Down
2 changes: 2 additions & 0 deletions assets/tvs/multitv/includes/multitv.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1069,6 +1069,7 @@ function displayMultiValue($tvOutput, $params)
$classes[] = $params['evenClass'];
}
$parser = new newChunkie($this->modx);
$parser->setPlaceholders($params);
foreach ($value as $key => $fieldvalue) {
$fieldname = (is_int($key)) ? $this->fieldnames[$key] : $key;
$parser->setPlaceholder($fieldname, $fieldvalue);
Expand Down Expand Up @@ -1098,6 +1099,7 @@ function displayMultiValue($tvOutput, $params)
if (!$params['toJson']) {
// wrap rowTpl output in outerTpl
$parser = new newChunkie($this->modx);
$parser->setPlaceholders($params);
$parser->setPlaceholder('wrapper', implode($params['outputSeparator'], $wrapper));
$parser->setPlaceholder('rows', array('offset' => $params['offset'], 'total' => $countOutput));
$parser->setPlaceholder('docid', $params['docid']);
Expand Down
2 changes: 1 addition & 1 deletion assets/tvs/multitv/multitv.snippet.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
$templates = $multiTV->templates;

// get snippet parameter
$params = array();
$params = &$modx->event->params;
$params['docid'] = (isset($docid)) ? $docid : $modx->documentObject['id'];
$params['outerTpl'] = (isset($outerTpl)) ? $outerTpl : (isset($templates['outerTpl']) ? '@CODE:' . $templates['outerTpl'] : '@CODE:<select name="' . $tvName . '">[+wrapper+]' . ((isset($paginate) && $paginate) ? '[+pagination+]' : '') . '</select>');
$params['emptyOutput'] = (isset($emptyOutput) && !$emptyOutput) ? false : true;
Expand Down

0 comments on commit d509e23

Please sign in to comment.