TV combobox @chunk dont work

Hello,

I created a TV with combobox.
I wish to generate values with a chunk. Inside the chunk there is GETRESOURCE Snippet call.
but snippet isnt processed.

We could do with @SELECT call, but ich will generate a dropdownlist with treepath for description text.

now I am searching for a solution.

I tried also via sql

WITH RECURSIVE category_path (id,  path) AS
(
  SELECT id,  pagetitle as path
    FROM am_site_content
    WHERE parent = 48 and isfolder = 1 and class_key='CollectionContainer'
  UNION ALL
  SELECT c.id, CONCAT(cp.path, ' > ', c.pagetitle)
    FROM category_path AS cp JOIN am_site_content AS c
      ON cp.id = c.parent
)
SELECT * FROM category_path ORDER BY path;

but only @SELECT bindings possible

thanks for feedback and tipps.

bye
Chris

It should be possible to have Input Option Values with a @CHUNK binding and a snippet call in the chunk. Make sure the snippet returns the different values in the right format:

option1==value1||option2==value2||option3==value3

So if you want to use getResources, then you probably have to use a call like this to get the right format.

[[getResources? &parents=`1` &limit=`0` &tpl=`@INLINE [[+pagetitle]]==[[+id]]` &outputSeparator=`||`]]

or you could write a custom snippet and call getResources in this snippet with $modx->runSnippet(...) or use xPDO instead.

maybe getResources doesn’t work in that context. Not sure, if it tries to do something with the modx->resource object, which might not available there.

migxLoopCollection works within @CHUNK - bindings