B
B
boberskyibohdan2020-08-04 12:22:50
MODX
boberskyibohdan, 2020-08-04 12:22:50

How to output URL of child element in collections?

There is a landing on which you need to edit news and tiles, when clicked on which the page should open. I decided to do it all through Collections. But you can only make 1 collection for the main template, so I made 1 more template for tiles and pulled up the info through GetPage. Everything is displayed super except for links to go.

[


At first I tried using , but it only showed me the main page, then I tried вопрос, then it showed the main page and /index.
<div class="col-sm-6 col-lg-4 wow fadeInUp" data-wow-delay=".9s">
        <div class="service-item">
          <div class="d-table">
            <a href="" class="d-table-cell">
              <span class="service-front">
                <img src="" alt="">
                <h3></h3>
                <p></p>
              </span>
              <span class="service-end">
                <img src="" alt="">
                <h3></h3>
                <p></p>
              </span>
            </a>
          </div>
        </div>
      </div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Lunegov, 2020-08-07
@alelunegov

The вопрос tag (with an asterisk) displays the alias of the resource on which it is called. That is, if you display this one on the main page of the site, then there will be index .
If you want to display a link to a resource through getPage (getResources), then you need to do as Ruslan <a href="" class="d-table-cell"> wrote .
PS Collections has nothing to do with it, it serves to organize child resources in the site admin panel and does not affect the external part of the site in any way.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question