# How to specify multiple ids without using &parents when using pdoResources?

**URL:** <https://community.modx.com/t/how-to-specify-multiple-ids-without-using-parents-when-using-pdoresources/8417>\
**Category:** Getting Started\
**Tags:** pdoresources\
**Created:** [March 10, 2025, 11:19pm UTC](https://community.modx.com/t/how-to-specify-multiple-ids-without-using-parents-when-using-pdoresources/8417 "2025-03-10T23:19:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ttoswar](https://community.modx.com/letter_avatar_proxy/v4/letter/t/58f4c7/32.png) [@ttoswar](https://community.modx.com/u/ttoswar)\
**Post date:** [March 10, 2025, 11:19pm UTC](https://community.modx.com/t/how-to-specify-multiple-ids-without-using-parents-when-using-pdoresources/8417/1 "2025-03-10T23:19:00Z")

</div>

````auto
## 问题描述  
我想通过 `&ids` 来指定页面的 `id`，手动选择需要的页面，而不是使用 `&parents` 选择一个文件夹下的页面。  
以下代码无法正常展示页面内容：  

```php
[[!pdoResources?
    &ids=`1,2,3` 
    &tpl=`line-detail`
    &select=`id,content`
    &includeTVs=`1`
]]

````

但是使用 `&parents` 时可以正常展示：

php

复制编辑

```auto
[[!pdoResources?
    &parents=`1` 
    &tpl=`line-detail`
    &select=`id,content`
    &includeTVs=`1`
]]

```

---

<div class="post-metadata">

**Author:** ![digitalpenguin](https://community.modx.com/user_avatar/community.modx.com/digitalpenguin/32/32_2.png) [@digitalpenguin](https://community.modx.com/u/digitalpenguin)\
**Post date:** [March 11, 2025, 1:23am UTC](https://community.modx.com/t/how-to-specify-multiple-ids-without-using-parents-when-using-pdoresources/8417/2 "2025-03-11T01:23:12Z")

</div>

Hi @ttoswar

You can use the `&resources=`1,2,3` ` param instead.

> **[pdoResources / Snippets / pdoTools / Extras / docs.modx.pro](https://docs.modx.pro/en/components/pdotools/snippets/pdoresources)**
>
> Fast fetching of pages and users of the site

---

<div class="post-metadata">

**Author:** ![halftrainedharry](https://community.modx.com/user_avatar/community.modx.com/halftrainedharry/32/1063_2.png) [@halftrainedharry](https://community.modx.com/u/halftrainedharry)\
**Post date:** [March 11, 2025, 9:29am UTC](https://community.modx.com/t/how-to-specify-multiple-ids-without-using-parents-when-using-pdoresources/8417/3 "2025-03-11T09:29:26Z")

</div>

Also make sure to set the “parents” property to `0`.  
Otherwise the ID of the current resource is used as the value for the “parents” property.

```html
[[!pdoResources?
    &resources=`1,2,3`
    &parents=`0`
    ...
]]

```
