Answer the question
In order to leave comments, you need to log in
Modx Revo - TV @SELECT - how to insert into SELECT id of edited document?
In general, there is a TV - list (multiple choice). In admissible values we do @SELECT
. So. You need to make a selection of other TV parameters, or rather their values in the current document being edited. In short, I can not find in the documentation how to do this.
Answer the question
In order to leave comments, you need to log in
I will give an example for the list of resources, for the list TV will be built by analogy:
1. Create a snippet:
$objects = $modx->getCollection('modResource', [
'deleted' => 0,
'published' => 1,
'hidemenu' => 0,
'parent' => $modx->resource->get('id')
]);
$items = [];
foreach ($objects as $object) {
$items[] = $object->get('pagetitle') . '==' . $object->get('id');
}
return implode('||', $items);
@EVAL return '-- Выберите --||' . $modx->runSnippet('snptName');
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question