Get related entries from matrix field I have a matrix field with one block type. In that block type, I have one field that is a related entries field.

How do I access the title from the related entries field from the matrix field?

Here is the setup I have:

Entry name is programs
In that entry I have a matrix block with handle name menuLinks
In that block, the related entries field name is called menuLink.

Thanks
Related entries in a matrix field are technically related to the matrix block and not the entry. So you will first want to get the related entries via relatedTo(block); then loop through the related entries to get the field values.

{% for block in entry.menuLinks %}
    {% set relatedEntries = craft.entries.section('SectionName').relatedTo(block) %}
    {% for entry in relatedEntries %}
        &lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;
    {% endfor %}
{% endfor %}


If you know there is one and only one block or related entry then you can skip the for..in loop(s) and just use the .first() method (i.e. entry.menuLinks.first() and or  craft.entries.section('SectionName').relatedTo(block).first());

Keep in mind that if you are just trying to create a simple list of links to related entries you do not need a matrix field at all (unless of course you are doing something more complicated). The Entries Field Type itself can support an unlimited number of related entries (and are sortable), so you could just create an entries field directly in programs.