O
O
ometovvlad2020-11-08 15:12:38
MODX
ometovvlad, 2020-11-08 15:12:38

How to output MIGX inside MIGX in MODX?

Good day to all!

Straight to the point.

It is necessary to display migx inside migx

I will say right away that everything is filled in and displayed correctly in the admin panel - therefore there are no errors when creating fields.

Here is the code.



textBlockService (piece)


tiles-tpl
<div class="tile">
  <div class="icon">
    <img src="" alt="">
  </div>
  <div class="name">
    <span></span>
  </div>
  <div class="text">
    <span>Good day to all! Straight to the point. It is necessary to display migx inside migx I will say right away that everything is filled in and displayed correctly in the admin panel - </span>
  </div>
</div>


Everything seems to be correct, but tiles-tpl is not displayed, although if you call in textBlockService , then all the data is in place.
[{"MIGX_id":"1","title":"Безболезненно","description":"
Вы чувствуете себя комфортно благодаря надежной анестезии

","ico":"/assets/img/icons/a-gel-blue.svg"},{"MIGX_id":"2","title":"Безболезненно","description":"
Вы чувствуете себя комфортно благодаря надежной анестезии

","ico":"/assets/img/icons/a-gel-blue.svg"},{"MIGX_id":"3","title":"Безболезненно","description":"
Вы чувствуете себя комфортно благодаря надежной анестезии

","ico":"/assets/img/icons/a-gel-blue.svg"}]


----------------------------
Supplement

I am dripping with this for the second day.

For some reason, modx transmits data in this form every other time and the output works, but also not correctly
[{"MIGX_id":"1","title":"\u0411\u0435\u0437\u0431\u043e\u043b\u0435\u0437\u043d\u0435\u043d\u043d\u043e","description":"\u0412 \ u044b \ u0447 \ u0443 \ u0432 \ u0441 \ u0442 \ u0432 \ u0443 \ u0435 \ u0442 \ u0435 \ u0441 \ u0435 \ u0431 \ u044f \ u043a \ u043e \ u043c \ u0444 \ u043e \ u0440 \ u0442 \ u043d \ u043e \ u0431 \ u043b \ u0430 \ u0433 \ u043e \ u0434 \ u0430 \ u0440 \ u044f \ u043d \ u0430 \ u0434 \ u0435 \ u0436 \ u043d \ u043e \ u0438 \ u0306 \ u0430 \ u043d \ u0435 \ u0441 \ u0442 \ u0435 \ u0437 \ u0438 \u0438","ico":"\/assets\/img\/icons\/a-gel-blue.svg"},{"MIGX_id":"2","title":"\u0411\u0435\u0437 \u0431\u043e\u043b\u0435\u0437\u043d\u0435\u043d\u043d\u043e","description":"\ U0412 \ u044b \ u0447 \ u0443 \ u0432 \ u0441 \ u0442 \ u0432 \ u0443 \ u0435 \ u0442 \ u0435 \ u0441 \ u0435 \ u0431 \ u044f \ u043a \ u043e \ u043c \ u0444 \ u043e \ u0440 \ u0442 \ u043d \ u043e \ u0431 \ u043b \ u0430 \ u0433 \ u043e \ u0434 \ u0430 \ u0440 \ u044f \ u043d \ u0430 \ u0434 \ u0435 \ u0436 \ u043d \ u043e \ u0438 \ u0306 \ u0430 \ u043d \ u0435 \ u0441 \ u0442 \ u0435 \ u0437 \u0438\u0438","ico":"\/assets\/img\/icons\/a-gel-blue.svg"}]

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Lunegov, 2020-11-10
@ometovvlad

There may be a problem with the output filter.
Try this design


change to

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question