A
A
ADMIN INDIGO2019-09-30 13:16:56
MODX
ADMIN INDIGO, 2019-09-30 13:16:56

How to get data from migxdb?

$doc = $modx->getObject('modResource', 15); // Got a resource object with an ID like 15
$migx_value = json_decode($doc->getTVValue('your_tv'), true); // got the TV value and converted from JSON to an array
This is how you can get data from just migx and how to get data from migxdb

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2019-09-30
@i__dmitry

I will answer you again)
To work with MIGXdb, there is a migxLoopCollection snippet that comes with MIGX. With it, you can display custom records from MIGXdb.
Examples from documentation:


If you need any deeper work at the PHP level, check out the source code for this snippet and the migx class itself.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question