Just migrating a site from 2 to 3 and stuck on this little call, cannot find anything in the docs at all.

Matrix field, Entries.

<a href="{{ entry.featuredProjectLink.getUrl() }}">

Cannot for the life of me find the equivalent/new way in the docs.



entry.featuredProjectLink is not an element or an array of elements, it is an object of type MatrixQuery in order to fetch elements you have to use the .one() or .all() function

<a href="{{ entry.featuredProjectLink.one().getUrl() }}">

Element Queries

Relations -> the "Going Through Matrix" part is the thing you want

  • Thank you very much for the reply. No link is being rendered however. Double checked, made sure the Entries field was completed, and yes, many times in the actual entry. Bizarre.
    – moondawg
    May 22 '18 at 18:31
  • is your featuredProjectLink a field of type Matrix? if so you won't receive a url because matrix blocks don't have an URL. You need to either select a field of type Categories, Entries, Assets or a field inside your matrix May 22 '18 at 18:32
  • It is and I am now sorted, thank you very much. Cleared the heavy caching I had set up.
    – moondawg
    May 22 '18 at 19:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.