Иван Бочкарев

Иван Бочкарев

С нами с 11 июня 2013; Место в рейтинге пользователей: #7
26 декабря 2018, 10:54
0
Создайте issue в репозитории modx revolution с описанием проблемы.

github.com/modxcms/revolution/issues
29 мая 2017, 05:08
0
Спасибо огромное!

Заработало с таким кодом:
[[!pdoMenu?
        &parents=`0`
        &level=`2`
        &firstClass=``
        &lastClass=``
        &outerClass=`navbar-nav`
        &parentClass=`dropdown`
        &rowClass=`nav-item`
        &tpl=`@INLINE <li{$classes}><a class="nav-link" href="{$link}">{$menutitle}</a>{$wrapper}</li>`
        &tplInnerRow=`@INLINE <a class="dropdown-item" href="{$link}">{$menutitle}</a>{$wrapper}`
        &tplInner=`@INLINE {$wrapper}`
        &tplParentRow=`@INLINE
        <li{$classes}>
            <a class="nav-link dropdown-toggle" href="{$link}" id="navbarDropdownMenuLink-{$id}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">{$menutitle}</a>
            <div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink-{$id}">
                {$wrapper}
            </div>
        </li>`
        &tplHere=`@INLINE <li{$classes}><a class="nav-link" href="{$link}">{$menutitle} <span class="sr-only">(current)</span></a>{$wrapper}</li>`
        &tplInnerHere=`@INLINE <a class="dropdown-item active" href="{$link}">{$menutitle}</a>{$wrapper}`
        ]]
26 октября 2016, 05:49
0
Вариант ручками: создать 2-а дополнительных ТВ параметра с типом ввода текст. custom-Image-alt и custom-Image-title.
<img src="[[*image]]" alt="[[*custom-Image-alt]]" title="[[*custom-Image-title]]"/>
26 октября 2016, 05:43
0
/* Canonical snippet */
/* Author Bob Ray */
/* produces an appropriate canonical tag for home and other pages */
/* put the snippet tag [[Canonical]]  in the <head> section of your template(s) */
$docid = $modx->resource->get('id');
$resource = $modx->getObject('modResource', $docid);
if($resource->get('class_key') == 'modSymLink') {
    
    $id = intval($resource->get('content'));
    $url = $modx->makeUrl($id, '', '', 'full');
    return '<link rel="canonical" href="'.$url.'">';
}
26 октября 2016, 05:38
+2
в Источникe файлов: MS2Gallery Images в разделе thumbnails укажите
[{"w":120,"h":90,"q":90,"zc":"1","f":"jpg","bg":"000000"}]
20 октября 2016, 06:12
1
0
[[!msVendor? &vendor=`{$product.vendor}` &returnOption=`name`]]
17 июня 2016, 15:49
0
Уже разобрался! )
17 июня 2016, 06:58
0
Ребята, подскажите. Поставил компонент, указал шаблон в дополнительном поле Создание PDF на лету.
Теперь когда открываю любой ресурс, где поле указано — мне открывается сразу PDF файл.
А мне нужно при переходе по ссылке PDF.

В папке PDF также не сохраняются файлы при сохранении ресурса.

Что я делаю не так? Заранее спасибо!
29 мая 2016, 17:25
0
Почитайте про Condition в pdoresources
29 мая 2016, 17:21
+1
Привет!

Попробуй так:

&filters=`
    msoption|option_direction:default,
    msoption|option_vendor:default,
`
&tplFilter.outer.msoption|option_direction=`tpl.mFilter2.filter.select`
&tplFilter.row.msoption|option_direction=`tpl.mFilter2.filter.option`

&tplFilter.outer.msoption|option_vendor=`tpl.mFilter2.filter.select`
&tplFilter.row.msoption|option_vendor=`tpl.mFilter2.filter.option`
24 мая 2016, 12:12
1
+1
Чанк ui-button

<li>
   <a href="#" data-filter=".[[+alias]]" class="">[[+pagetitle]]</a>
</li>
Чанк с оформлением article-tpl-projects

<article class="project-item [[getAlias? &id=`[[+parent]]`]]">
	<figure>
		<img src="[[+476x344]]" alt="[[+pagetitle]]" class="img-responsive">
		<figcaption>
            <div class="caption-wrap">
               <div class="actions">
					<a href="[[~[[+id]]]]" class="btn-border btn-border-sm" title="[[+pagetitle]]">
                  		<img src="../img/link.svg" alt="" class="">
                	</a>
                </div>
            </div>
         </figcaption>
	</figure>
	<div class="project-info">
		<a href="[[~[[+id]]]]">[[+pagetitle]]</a>
		<div class="p-client">[[+tv.client]]</div>
	</div>
</article>
в нем указан вызов снипета который и проставляет алиас
<article class="project-item [[getAlias? &id=`[[+parent]]`]]">
Сниппет getAlias

<?php
/**
 * getAlias
 *
 * DESCRIPTION
 *
 * This snippet returns the alias of a page matching an id
 *
 * USAGE:
 *
 * [[!getAlias? &id=`[[+parent]]`]]
 */
 
$page = $modx->getObject('modResource', $id);
if(!empty($page)) {
    return $page->get('alias');
}
return '';
24 мая 2016, 10:28
1
+1
Нет.
Там же все просто. Вот мой пример:
<section id="portfolio">
		
		<h2 class="module-title-font">Последние работы</h2>
			
			<div class="home-projects text-center">
			    <div id="options" data-effect="fade" class="effect-fade in" style="transition: all 0.7s ease-in-out;">
			    
			    <ul id="filters" class="option-set">
  				
  			    <li><a href="#" data-filter="*" class="">Все</a></li>
    				[[!pdoResources? 
    					&parents=`3` 
    					&tpl=`ui-button` 
    					&sortby=`pagetitle` 
    					&sortdir=`ASC` 
    					&includeTVs=`0` 
    					&depth=`0` 
    				]]
    			</ul>
    			
    			</div>
     
    			<div id="container">

    				[[!pdopage?
                    	&element=`ms2GalleryResources`
                    	&parents=`3`
                    	&limit=`0`
                    	&tpl=`article-tpl-projects`
                       	&includeContent=`1` 
    					&sortDir=`DESC`
                        &sortby=`publishedon`
    					&depth=`1`
                    	&typeOfJoin=`inner`
                    	&includeThumbs=`476x344`
                    	&includeOriginal=`1`
                    	&includeTVs=`client`
                    ]]
    			    
    			</div>

			</div>
			
	</section>
01 марта 2016, 21:41
+1
попробуй так:
[[!BannerY?
	&position=`[[*parent:parent=`id`:parent=`parent`]]`
]]
01 марта 2016, 20:56
0
[[*parent:parent=`id`:parent=`longtitle`]]
01 марта 2016, 20:45
0
Урок по созданию сложных меню:
Создание адаптивного Mega Menu
21 января 2016, 20:04
0
Я так делал





[[!+reg.dob.error]]