Вывод в шаблоне доп поле ч/з pdoResources- СТОПОР

Добрый день, стал в стопор, что я делаю не так?
Нужно вывести в шаблоне дополнительное поле с типом «текстовый редактор»

В шаблоне вывожу:
[[!pdoResources?
&limit=`1`
&tpl=`pomochElement`
&includeTVs=`nuzna-pomoch`
&toPlaceholder=`pomochOuter`
&showLog=`0`
]]

[[+pomochOuter:notempty=`
[[+pomochOuter]]



`]]

В чанке pomochElement
[[*nuzna-pomoch]]

Не выводит нихрена, плиз поможите
алексей
16 августа 2018, 15:08
modx.pro
1 850
0

Комментарии: 20

Наумов Алексей
16 августа 2018, 15:37
0
см. параметр tvPrefix у сниппета pdoResources
    алексей
    16 августа 2018, 20:26
    0
    совершенно верно
      Баха Волков
      16 августа 2018, 20:36
      0
      Showlog что говорит?
        Баха Волков
        16 августа 2018, 20:37
        0
        Может у первого попавшегося ресурса TV не заполнено?
          алексей
          16 августа 2018, 20:42
          0
          поле точно заполнено
          вот лог
          0.0001972: pdoTools loaded
          0.0000491: xPDO query object created
          0.0005951: Included list of tvs: text-pod-kartoy
          0.0003550: leftJoined modTemplateVarResource as TVtext-pod-kartoy
          0.0005181: Added selection of modResource: `id`, `type`, `contentType`, `pagetitle`, `longtitle`, `description`, `alias`, `link_attributes`, `published`, `pub_date`, `unpub_date`, `parent`, `isfolder`, `introtext`, `richtext`, `template`, `menuindex`, `searchable`, `cacheable`, `createdby`, `createdon`, `editedby`, `editedon`, `deleted`, `deletedon`, `deletedby`, `publishedon`, `publishedby`, `menutitle`, `donthit`, `privateweb`, `privatemgr`, `content_dispo`, `hidemenu`, `class_key`, `context_key`, `content_type`, `uri`, `uri_override`, `hide_children_in_tree`, `show_in_tree`, `properties`
          0.0000181: Added selection of modTemplateVarResource: IFNULL(`value`, '') AS `tv.text-pod-kartoy`
          0.0005910: Processed additional conditions
          0.0009260: Added where condition: modResource.parent:IN(94), modResource.published=1, modResource.deleted=0
          0.0000169: Replaced TV conditions
          0.0001891: Sorted by modResource.publishedon, DESC
          0.0000069: Limited to 1, offset 0
          0.0003672: SQL prepared "SELECT `modResource`.`id`, `modResource`.`type`, `modResource`.`contentType`, `modResource`.`pagetitle`, `modResource`.`longtitle`, `modResource`.`description`, `modResource`.`alias`, `modResource`.`link_attributes`, `modResource`.`published`, `modResource`.`pub_date`, `modResource`.`unpub_date`, `modResource`.`parent`, `modResource`.`isfolder`, `modResource`.`introtext`, `modResource`.`richtext`, `modResource`.`template`, `modResource`.`menuindex`, `modResource`.`searchable`, `modResource`.`cacheable`, `modResource`.`createdby`, `modResource`.`createdon`, `modResource`.`editedby`, `modResource`.`editedon`, `modResource`.`deleted`, `modResource`.`deletedon`, `modResource`.`deletedby`, `modResource`.`publishedon`, `modResource`.`publishedby`, `modResource`.`menutitle`, `modResource`.`donthit`, `modResource`.`privateweb`, `modResource`.`privatemgr`, `modResource`.`content_dispo`, `modResource`.`hidemenu`, `modResource`.`class_key`, `modResource`.`context_key`, `modResource`.`content_type`, `modResource`.`uri`, `modResource`.`uri_override`, `modResource`.`hide_children_in_tree`, `modResource`.`show_in_tree`, `modResource`.`properties`, IFNULL(`TVtext-pod-kartoy`.`value`, '') AS `tv.text-pod-kartoy` FROM `modx_site_content` AS `modResource` LEFT JOIN `modx_site_tmplvar_contentvalues` `TVtext-pod-kartoy` ON `TVtext-pod-kartoy`.`contentid` = `modResource`.`id` AND `TVtext-pod-kartoy`.`tmplvarid` = 40 WHERE  ( `modResource`.`parent` IN (94) AND `modResource`.`published` = 1 AND `modResource`.`deleted` = 0 )  ORDER BY modResource.publishedon DESC LIMIT 1 "
          0.0001309: SQL executed
          0.0000160: Rows fetched
          0.0000229: Prepared and processed TVs
          0.0000100: Returning processed chunks
          0.0036912: Total time
          6 553 600: Memory usage
            Баха Волков
            16 августа 2018, 21:05
            0
            Я правильно понимаю, что в вызове есть условие (where) касаемо TV с названием text-pod-kartoy?
            алексей
            16 августа 2018, 20:44
            0
            если просто выводить [[*text-pod-kartoy]], то все выходит, а вот с &toPlaceholder нет
              Баха Волков
              16 августа 2018, 21:06
              0
              [[*text-pod-kartoy]] такая запись выводит поле ресурса на которой пользователь находится
                алексей
                16 августа 2018, 21:17
                0
                да
                  Баха Волков
                  16 августа 2018, 21:19
                  0
                  Попробуйте убрать дефисы/тире из названия TV и попробуйте
                    алексей
                    16 августа 2018, 21:49
                    0
                    переименовал поле в шаблоне
                    [[!pdoResources? 
                        &limit=`1`
                        &tpl=`tpl.textpodkartoy`
                        &includeTVs=`textpodkartoy`
                        &toPlaceholder=`textOuter`
                        &showLog=`1`
                        ]]
                        
                        ---
                        [[+textOuter]]
                        ---
                           
                        ---
                    чанк tpl.textpodkartoy
                    [[*textpodkartoy]]

                    лог:
                    0.0001869: pdoTools loaded
                    0.0000582: xPDO query object created
                    0.0006430: Included list of tvs: textpodkartoy
                    0.0003319: leftJoined modTemplateVarResource as TVtextpodkartoy
                    0.0005670: Added selection of modResource: `id`, `type`, `contentType`, `pagetitle`, `longtitle`, `description`, `alias`, `link_attributes`, `published`, `pub_date`, `unpub_date`, `parent`, `isfolder`, `introtext`, `richtext`, `template`, `menuindex`, `searchable`, `cacheable`, `createdby`, `createdon`, `editedby`, `editedon`, `deleted`, `deletedon`, `deletedby`, `publishedon`, `publishedby`, `menutitle`, `donthit`, `privateweb`, `privatemgr`, `content_dispo`, `hidemenu`, `class_key`, `context_key`, `content_type`, `uri`, `uri_override`, `hide_children_in_tree`, `show_in_tree`, `properties`
                    0.0000191: Added selection of modTemplateVarResource: IFNULL(`value`, '') AS `tv.textpodkartoy`
                    0.0008039: Processed additional conditions
                    0.0015650: Added where condition: modResource.parent:IN(94), modResource.published=1, modResource.deleted=0
                    0.0000379: Replaced TV conditions
                    0.0002730: Sorted by modResource.publishedon, DESC
                    0.0000091: Limited to 1, offset 0
                    0.0004709: SQL prepared "SELECT `modResource`.`id`, `modResource`.`type`, `modResource`.`contentType`, `modResource`.`pagetitle`, `modResource`.`longtitle`, `modResource`.`description`, `modResource`.`alias`, `modResource`.`link_attributes`, `modResource`.`published`, `modResource`.`pub_date`, `modResource`.`unpub_date`, `modResource`.`parent`, `modResource`.`isfolder`, `modResource`.`introtext`, `modResource`.`richtext`, `modResource`.`template`, `modResource`.`menuindex`, `modResource`.`searchable`, `modResource`.`cacheable`, `modResource`.`createdby`, `modResource`.`createdon`, `modResource`.`editedby`, `modResource`.`editedon`, `modResource`.`deleted`, `modResource`.`deletedon`, `modResource`.`deletedby`, `modResource`.`publishedon`, `modResource`.`publishedby`, `modResource`.`menutitle`, `modResource`.`donthit`, `modResource`.`privateweb`, `modResource`.`privatemgr`, `modResource`.`content_dispo`, `modResource`.`hidemenu`, `modResource`.`class_key`, `modResource`.`context_key`, `modResource`.`content_type`, `modResource`.`uri`, `modResource`.`uri_override`, `modResource`.`hide_children_in_tree`, `modResource`.`show_in_tree`, `modResource`.`properties`, IFNULL(`TVtextpodkartoy`.`value`, '') AS `tv.textpodkartoy` FROM `modx_site_content` AS `modResource` LEFT JOIN `modx_site_tmplvar_contentvalues` `TVtextpodkartoy` ON `TVtextpodkartoy`.`contentid` = `modResource`.`id` AND `TVtextpodkartoy`.`tmplvarid` = 40 WHERE  ( `modResource`.`parent` IN (94) AND `modResource`.`published` = 1 AND `modResource`.`deleted` = 0 )  ORDER BY modResource.publishedon DESC LIMIT 1 "
                    0.0001628: SQL executed
                    0.0000200: Rows fetched
                    0.0000248: Prepared and processed TVs
                    0.0000069: Returning processed chunks
                    0.0046649: Total time
                    6 553 600: Memory usage
                    результат тот же
                      Баха Волков
                      16 августа 2018, 22:09
                      0
                      чанк tpl.textpodkartoy
                      [[*textpodkartoy]]
                      Я же говорю:
                      [[*text-pod-kartoy]] такая запись выводит поле ресурса на которой пользователь находится
                      В чанке нужно писать:

                      [[+tv.textpodkartoy]]
                        алексей
                        16 августа 2018, 22:16
                        0
                        да, если просто
                        [[*textpodkartoy]], все выходит.
                        если через плейсхолдер и чанк tpl.textpodkartoy (в чанке [[+tv.textpodkartoy]]) нихрена
        алексей
        16 августа 2018, 15:44
        0
        из доки
        &tvPrefix tv. Префикс для ТВ параметров.
        В чанке pomochElement пробоввал
        [[+tv.nuzna-pomoch]]

        результат 0
          Баха Волков
          16 августа 2018, 19:44
          0
          Я верно понимаю, что вы хотите вывести TV у первого попавшегося дочернего ресурса?
            алексей
            17 августа 2018, 10:25
            0
            сам спросил сам отвечу
            ошибка была в том, что не указан текущий ресурс
            вот так все работает
            [[!pdoResources? 
                &depth=`1`
                &hideContainers=`0`
                &resources=`[[*id]]`
                &parents=`6`
                &limit=`1`
                &tpl=`text-main-down`
                &includeTVs=`textpodkartoy`
                &showLog=`0`
                 &toPlaceholder=`textpodkartoyOuter`
                ]]
            
             <div class="text-main-down">
                        <div class="container">
                [[+textpodkartoyOuter]]
               
             <div class="push20"></div>
             </div>
             </div>
              алексей
              17 августа 2018, 10:34
              0
              но если указать notempty не хочет выводить
              [[+textpodkartoyOuter:notempty=`
                 <div class="text-main-down">
                          <div class="container"> [[+textpodkartoyOuter]]
                           <div class="push20"></div>
               </div>
               </div>
                  `]]
              (
                алексей
                17 августа 2018, 10:36
                0
                и не работает если указать иначе !empty
                алексей
                17 августа 2018, 11:35
                0
                даже не знаю что ответить, но если поле не заполнено оно просто не выводится, т.е. нет необходимости в notempty
                  Баха Волков
                  17 августа 2018, 19:15
                  0
                  Так вы выводите TV этого же ресурса?
                    Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.
                    20