Modx getResources: display all resources' ids

665 views Asked by At

I need to display all resources' ids as page content, so I used:

 [[!getResources? &parents=`0` &tpl=`myTpl`]]

and in myTpl chunk: [[*id]],

But it only displays the current resource's id five times like this:

63, 63, 63, 63, 63,

5 is the number of published resources I have in my tree. I guess my chunk is wrong. The question is how to display all resources' ids on the page?

1

There are 1 answers

0
Svetljo On BEST ANSWER

Change [[*id]] to [[+id]]. [[*id]], [[*pagetitle]], etc. are placeholders for the current resource.