[[+content_image]]
A
A
ADMIN INDIGO2019-11-08 16:50:38
MODX
ADMIN INDIGO, 2019-11-08 16:50:38

How to get data in migx in snippet?

How to get data in migx in snippet?
So that I can assemble the block through php and display the necessary data, is there any other way than [[getImageList?

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
I
Igor, 2019-11-14
@ig0r74

If you use Fenom, then like this:

{set $rows = json_decode($_modx->resource.reviews, true)}
    {foreach $rows as $row}
     <a href="{$row.link}" class="sidebartopic">
      <img src="{$_modx->runSnippet("pthumb", [ 'input' => $row.image, 'options' => 'w=350&h=180&zc=1&q=90', 'useResizer' => 1, ])}" alt="{$row.title}">
      <span>{$row.title}</span>
    </a>
    {/foreach}

In php, you also need to get the TV value and convert json to an array.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question