htaccess
RewriteRule ^([a-z]{2})$ $1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z]{2})/(.*)$ index.php?q=$2&lang=$1 [L,QSA]
Дальше файлик core/custom/config/app/locale.php
htaccess
RewriteRule ^([a-z]{2})$ $1/ [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([a-z]{2})/(.*)$ index.php?q=$2&lang=$1 [L,QSA]
Дальше файлик core/custom/config/app/locale.php
all you need to do is get the data and pass it to your image processor class. *file mtvCrop,js is part MultiTV and automatic load in back-end. not use in front-end. prepare multitv and config
if you have already installed and configured multitv and the necessary configuration files, then proceed to creating a snippet create tv 'goods_images', type: multitv description of the structure (can be skipped)
in back-end on page edit image (in TV goods_images). after that image`s info saved in site_tmplvar_contentvalues like this:
| if( $('.show-catalognext').length ){ | |
| /*Проверка того, что есть кнопка "вперед" в пагинаторе. В efilterresult 'TplNextP'=>'@CODE: <li class="page-item show-catalognext"><a href="[+link+]" class="page-link"> » </a></li>',*/ | |
| $('.showmore_wrapper').show(); /*показать кнопку "показать еще"*/ | |
| $('#showmore_button').on('click',function(){ | |
| if($('.show-catalognext>a').length){ | |
| var link = $('.show-catalognext>a').attr("href"); | |
| $.get( link, function (data) { | |
| var products = $(data).find('#products_list').html(); | |
| $("#products_list").append(products); //подгрузка продуктов со следующей страницы в обертку | |
| var pagination = $(data).find('#pagination-pager').html(); |
| @if(!empty($productOptions)) | |
| <ul> | |
| @foreach ($productOptions as $item) | |
| <li><b>{{ $item['caption'] }}:</b> {{ str_replace("||",", ",$item['value']) }}</li> {{--не помню зачем, вроде, для множественных значений--}} | |
| @endforeach | |
| </ul> | |
| @endif |
| download https://raw.githubusercontent.com/digitalBush/jquery.maskedinput/master/dist/jquery.maskedinput.js |
| array_walk($data, function(&$v, $k) { | |
| if(is_string($v) && strpos($v, '"') !== false) { | |
| $v = str_replace('"', '\"', $v); | |
| } | |
| }); |
| <?php | |
| /*usage: [[ list? &tvname=`param` &class=`myclass` &name=`myname` &docid=`N` ]] */ | |
| $doc = isset($docid) ? $docid : $modx->documentIdentifier; | |
| $class = isset($class) ? $class : ""; | |
| $name = isset($name) ? $name : ""; | |
| $input = $modx->getTemplateVar($tvname,'*',$doc)['value']; | |
| $vals = explode("||",$input); |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <rss xmlns:yandex="http://news.yandex.ru" | |
| xmlns:media="http://search.yahoo.com/mrss/" | |
| xmlns:turbo="http://turbo.yandex.ru" | |
| version="2.0"> | |
| <channel> | |
| <title>[(site_name)]</title> | |
| <link>[(site_url)]</link> | |
| <description>[*description*]</description> | |
| [[DocLister? &parents=`10` &format=`rss` &tpl=`rss_tpl` &depth=`3` &prepare=`rss_prepare` &display=`50` &dateFormat='%s' ]] |
| <!-- Yandex.Metrika counter --> | |
| <script type="text/javascript" > | |
| (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)}; | |
| m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)}) | |
| (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym"); | |
| ym({{ $modx->getConfig('client_ymid') }}, "init", { | |
| id:{{ $modx->getConfig('client_ymid') }}, | |
| clickmap:true, | |
| trackLinks:true, | |
| accurateTrackBounce:true, |