V
V
Vadim Yagofarov2018-12-12 11:01:20
MODX
Vadim Yagofarov, 2018-12-12 11:01:20

Why are pictures not displayed through migx?

Images are displayed on the main page normally. I'll take it out in a moment.

<div class="row">
            <div class="col-lg-12 text-center work__slider">
                [[getImageList?
                &tvname=`slider-work`
                &tpl=`@CODE: <div class="work__slider_item" style="background-image: url([[+image]]);"></div>`
                ]]
                
            </div>
        </div>

And in the resource, when you add the path, it looks like this assets/img/s1.jpg. But when I display it on other pages, on the internal pages, the pictures are not displayed on the site, however, when I go to the resource and edit the mix field and add a slash in front, then let it become /assets/img/s1.jpg and in this case the picture is displayed normally . Never encountered this before. The problem seems to be solved, but I want to know why this happens and how to fix it so that I don’t add a slash every time
5c10c0bb4c0b1314237624.png5c10c0c0f127d154489625.png

Answer the question

In order to leave comments, you need to log in

[[+comments_count]] answer(s)
A
Anton Tarasov, 2018-12-12
@GIRUPC

we are talking about the relativity / absoluteness of paths, this is influenced by system settings (from the base config, see what you have in the tag), context settings (if any), file source settings (if more than just default), less often - tricky redirect settings

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question