pdotools - вывод информации

Всем привет, не получается вывести информацию:
— Категория 1
--Категория 2
---Документ с доп.полями, который необходимо вывести.
Код:
[[pdoResources?
 &parents=`6`
 &resources=`7`
 &processTVs=`1`
 &tpl=`tpldom`
 &includeTVs=`image,dometazh,domspalen,domsanuzel,price`
]]
Код чанка tpldom:
<table border="1" frame="hsides" rules="rows" cellspacing="0" align="center">
	<tbody>
		<tr>
			<td style="text-align: center;" rowspan="10" width="610">
				<a href="[[~[[+id]]]]"><img src="[[*image]]" border="0" width="610" height="291" style="display: block; margin-left: NaNpx; margin-right: NaNpx; border: 0;"></a>
			</td>
		</tr>
		<tr bgcolor="#fdedca">
			<td height="30px">
				<div style="text-align: left;" align="Center"><strong><strong><span style="color: #4b2616;"><span style="font-size: medium;"> Проект:</span></span></strong></strong>
				</div>
			</td>
			<td>
				<div style="text-align: center;" align="Center"><strong><strong><span style="color: #4b2616;"><span style="font-size: medium;">[[*pagetitle]]</span></span></strong></strong><strong style="line-height: 1.3em; background-color: #ffffff;"><span style="color: #4b2616;"><span style="font-size: medium;"><sup>
</sup></span></span></strong></div>
			</td>
		</tr>
		<tr bgcolor="#dfc490">
			<td height="30px">
				<div>
					<div style="text-align: left;" align="Center"><strong><span style="color: #4b2616;"><span style="font-size: medium;"> Площадь:</span></span></strong></div>
				</div>
			</td>
			<td height="30px">
				<div style="text-align: center;" align="Center"><strong><span style="color: #4b2616;"><span style="font-size: medium;">[[*domsize]] м<sup>2</sup></span></span></strong><strong style="line-height: 1.3em; background-color: #ffffff;"><span style="color: #4b2616;"><span style="font-size: medium;"><sup>
</sup></span></span></strong></div>
			</td>
		</tr>
		<tr bgcolor="#fdedca">
			<td height="30px">
				<div style="text-align: left;" align="Center"><strong><span style="color: #4b2616;"><span style="font-size: medium;"> Этажей:</span></span></strong></div>
			</td>
			<td height="30px">
				<div style="text-align: center;" align="Center"><strong><span style="color: #4b2616;"><span style="font-size: medium;">[[*dometazh]]</span></span></strong><strong style="line-height: 1.3em; background-color: #ffffff;"><span style="color: #4b2616;"><span style="font-size: medium;"><sup>
</sup></span></span></strong></div>
			</td>
		</tr>
		<tr bgcolor="#dfc490">
			<td height="30px">
				<div style="text-align: left;" align="Center"><strong><span style="color: #4b2616;"><span style="font-size: medium;"> Спален:</span></span></strong></div>
			</td>
			<td height="30px">
				<div style="text-align: center;" align="Center"><strong><span style="color: #4b2616;"><span style="font-size: medium;">[[*domspalen]]</span></span></strong><strong style="line-height: 1.3em; background-color: #ffffff;"><span style="color: #4b2616;"><span style="font-size: medium;"><sup>
</sup></span></span></strong></div>
			</td>
		</tr>
		<tr bgcolor="#fdedca">
			<td height="30px">
				<div style="text-align: left;" align="Center"><strong><span style="color: #4b2616;"><span style="font-size: medium;"> Сан.узлов:</span></span></strong></div>
			</td>
			<td width="120" height="30px">
				<div style="text-align: center;" align="Center"><strong><span style="color: #4b2616;"><span style="font-size: medium;">[[*domsanuzel]]</span></span></span></strong><strong style="line-height: 1.3em; background-color: #ffffff;"><span style="color: #4b2616;"><span style="font-size: medium;"><sup>
</sup></span></span></strong></div>
			</td>
		</tr>
		<tr bgcolor="#dfc490">
			<td height="30px">
				<div style="text-align: left;" align="Center"><strong><span style="color: #4b2616;"><span style="font-size: medium;"> Цена:</span></span></strong></div>
			</td>
			<td height="30px">
				<div style="text-align: center;" align="Center"><span style="text-decoration: underline;"><strong><span style="color: #4b2616; text-decoration: none;"><span style="font-size: medium;">от [[*price]] руб.</span></span>
					</strong>
					</span><strong style="line-height: 1.3em; background-color: #ffffff;"><span style="color: #4b2616;"><span style="font-size: medium;"><sup>
</sup></span></span></strong></div>
			</td>
		</tr>
		<tr>
			<td colspan="2" bgcolor="#dfc490"> </td>
		</tr>
		<tr>
			<td id="td1" style="text-align: center; text-decoration: none;" onmouseover="td1.bgColor='#dfc490'" onmouseout="td1.bgColor='#fdedca'" colspan="2" bgcolor="#fdedca" height="30px"><a href="[[~[[+id]]]]"> <strong><span style="color: #4b2616; text-decoration: none;"><span style="font-size: medium;"> Подробнее...</span></span></strong></a></td>
		</tr>
	</tbody>
</table>
Не выводится доп.поля документа.
Wade666
11 января 2018, 11:01
modx.pro
732
0

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

Андрей
11 января 2018, 14:24
1
+1
Вот это не нужно:
&processTVs=`1`
И вывод у вас неправильный, надо так:
[[+tv.image]]
Либо можно без префикса tv, добавить в вызов параметр:
&tvPrefix=``
    Wade666
    11 января 2018, 15:19
    0
    Исправил, но не помогло.
      Андрей
      11 января 2018, 15:30
      +1
      Ну вообще должно работать) Включайте параметр:
      &showLog=`1`
      И смотрите что в выборке.
        Wade666
        11 января 2018, 15:50
        0
        Я мб не так объяснил.
        Есть страница, назовем её Проекты. На ней должна выводится информация, которая находится по такой иерархии: Проекты=>Проекты домов=> Документ, который должен выводиться.
        Но он не выводится.
        showLog подключил:
        0.0000870: pdoTools loaded
        0.0000229: xPDO query object created
        0.0005431: Included list of tvs: image, dometazh, domspalen, domsanuzel, price
        0.0001390: leftJoined modTemplateVarResource as TVimage
        0.0000939: leftJoined modTemplateVarResource as TVdometazh
        0.0000870: leftJoined modTemplateVarResource as TVdomspalen
        0.0000861: leftJoined modTemplateVarResource as TVdomsanuzel
        0.0000930: leftJoined modTemplateVarResource as TVprice
        0.0002050: Added selection of modResource: SQL_CALC_FOUND_ROWS `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.0000091: Added selection of modTemplateVarResource: IFNULL(`value`, '') AS `image`
        0.0000041: Added selection of modTemplateVarResource: IFNULL(`value`, '') AS `dometazh`
        0.0000041: Added selection of modTemplateVarResource: IFNULL(`value`, '') AS `domspalen`
        0.0000021: Added selection of modTemplateVarResource: IFNULL(`value`, '') AS `domsanuzel`
        0.0000019: Added selection of modTemplateVarResource: IFNULL(`value`, '') AS `price`
        0.0003500: Processed additional conditions
        0.0004880: Added where condition: modResource.id:IN(7), modResource.parent:IN(6,7), modResource.published=1, modResource.deleted=0
        0.0000551: Replaced TV conditions
        0.0001891: Sorted by modResource.publishedon, DESC
        0.0000031: Limited to 10, offset 0
        0.0002420: SQL prepared "SELECT SQL_CALC_FOUND_ROWS `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(`TVimage`.`value`, '') AS `image`, IFNULL(`TVdometazh`.`value`, '') AS `dometazh`, IFNULL(`TVdomspalen`.`value`, '') AS `domspalen`, IFNULL(`TVdomsanuzel`.`value`, '') AS `domsanuzel`, IFNULL(`TVprice`.`value`, '') AS `price` FROM `modx_site_content` AS `modResource` LEFT JOIN `modx_site_tmplvar_contentvalues` `TVimage` ON `TVimage`.`contentid` = `modResource`.`id` AND `TVimage`.`tmplvarid` = 2 LEFT JOIN `modx_site_tmplvar_contentvalues` `TVdometazh` ON `TVdometazh`.`contentid` = `modResource`.`id` AND `TVdometazh`.`tmplvarid` = 4 LEFT JOIN `modx_site_tmplvar_contentvalues` `TVdomspalen` ON `TVdomspalen`.`contentid` = `modResource`.`id` AND `TVdomspalen`.`tmplvarid` = 5 LEFT JOIN `modx_site_tmplvar_contentvalues` `TVdomsanuzel` ON `TVdomsanuzel`.`contentid` = `modResource`.`id` AND `TVdomsanuzel`.`tmplvarid` = 6 LEFT JOIN `modx_site_tmplvar_contentvalues` `TVprice` ON `TVprice`.`contentid` = `modResource`.`id` AND `TVprice`.`tmplvarid` = 7 WHERE  ( `modResource`.`id` IN (7) AND `modResource`.`parent` IN (6,7) AND `modResource`.`published` = 1 AND `modResource`.`deleted` = 0 )  ORDER BY modResource.publishedon DESC LIMIT 10 "
        0.0006039: SQL executed
        0.0000620: Total rows: 1
        0.0000131: Rows fetched
        0.0103960: Prepared and processed TVs
        0.0007770: Loaded "modChunk" with name "tpldom"
        0.0152581: Returning processed chunks
        0.0288250: Total time
        4 194 304: Memory usage
          Андрей
          11 января 2018, 16:38
          1
          +1
          Примерно понятно, попробуйте так:
          [[pdoResources?
          	&parents=`6`
          	&tpl=`tpldom`
          	&includeTVs=`image,dometazh,domspalen,domsanuzel,price`
           	&hideContainers=`1`
          ]]

          Где в parents — 6 — это id документа «Проекты». Тв параметры в чанке соответственно вызывайте так:
          [[+tv.image]], [[+tv.price]] и т.д.
            Wade666
            11 января 2018, 17:50
            0
            Спасибо, помогло.
            nuraksha
            11 января 2018, 16:40
            0
            Вы забыли про параметр tvPrefix
            Нужно в выводе использовать не
            [[*image]]
            а
            [[+tv.image]]
      Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.
      7