MODX Community

Collections: getSelection is not returning any results

Hi,
I’m trying the Selections feature of Collections for the first time.
i made a Selection with 2 items on it, they are all published. next i put the snippet on a resource

[[!getSelections? &selections=`79` &tpl=`test` ]]

79 is the ID of the selection resource. Because i couldn’t get this to work
I checked the getSelection snippet and found that the query

$linkedResources = $linkedResourcesQuery->stmt->fetchAll(PDO::FETCH_COLUMN, 0);

is not returning anything.
Am i doing something wrong? anyone else having trouble using the getSelections snippet?
tnx
RDG

You’ve got a space at the end of the snippet, after the tpl but before the closing brackets, not sure if its important but a space isn’t good there

Hi,

No that wasn’t it. there was a menuindex missing in the Snippet. Allready made a pull request with a fix

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.