Last active
September 5, 2017 16:58
-
-
Save OlegShchavelev/d0d50aece6d8327abf8147aa7b543a79 to your computer and use it in GitHub Desktop.
Тв-параметры тип данных select при мультиязычном сайте
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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