Skip to content

Instantly share code, notes, and snippets.

@OlegShchavelev
Last active September 5, 2017 16:58
Show Gist options
  • Save OlegShchavelev/d0d50aece6d8327abf8147aa7b543a79 to your computer and use it in GitHub Desktop.
Save OlegShchavelev/d0d50aece6d8327abf8147aa7b543a79 to your computer and use it in GitHub Desktop.
Тв-параметры тип данных select при мультиязычном сайте
<?php
$id = $modx->documentIdentifier;
$url = $modx->resource->get('id');
$res = $modx->getObject('modResource',$url);
$output = $res->get('context_key');
if ($output == 'web') {
$val = $modx->runSnippet('getImageList',array('tvname'=>directory,'tpl'=>'@CODE: [[+name]]','docid'=>25, 'outputSeparator'=>'||'));
print $val;
}
else {
$val = $modx->runSnippet('getImageList',array('tvname'=>directory,'tpl'=>'@CODE: [[+name]]','docid'=>177, 'outputSeparator'=>'||'));
print $val;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment