Answer the question
In order to leave comments, you need to log in
Migx. Displaying the column names (caption) of a table?
Good afternoon. There is an MGIX TV option.
Form tabs:
[
{"caption":"Company departments","fields": [
{"field":"name_department",
"caption":"Department name"
},{
"field":"tel_department",
"caption" :"Phone"
},{
"field":"mail_department",
"caption":"E-mail"
},{
"field":"mode_department",
"caption":"Working mode"
}
]
}]
Column layout:
[
{"header": "Department name", "width": "
{"header": "E-mail", "width": "40", "sortable": "false", "dataIndex": "mail_department"},
{"header": "Mode", "width": "40", "sortable": "false", "dataIndex": "mode_department"}
]
Output like this:
$resource = $modx->getObject('modResource', 11);
$mode = $resource->getTVValue(8);
$ar = json_decode($mode, true);
print_r($ar[0]);
I get something like this:
Array ( [MIGX_id] => 1 [name_department] => test [tel_department] => 1234567 [mail_department] => [email protected] [mode_department] =>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question