I
I
issssrt2014-02-07 14:14:35
MODX
issssrt, 2014-02-07 14:14:35

MODX REVO will pass the parent id to the snippet

I have a custom tv
In the possible values ​​field instead of static, a snippet is called, like this -
@EVAL return '-- choose a user --||' . $modx->runSnippet('Rowboat',array('table'=>'modx_users','tpl'=>'userOption','outputSeparator'=>'||'));
QUESTION - How can I pass the id of the parent document to this snippet? Or calculate it in the snippet itself?
Those. when creating a new resource, this TV must pass the parent id to the snippet so that the snippet can then generate the necessary data for tv

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
z0091, 2014-02-10
@z0091

Try "$modx->resource->get('id')" in the Rowboat snippet

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question