<p>If <code>pageLink</code> is an Entry field and <code>image</code> is an Assets field, then you're probably looking for something like this:</p>

<pre><code>&lt;a href="{{ block.pageLink.first().getUrl() }}"&gt;
    &lt;img src="{{ block.image.first().getUrl() }}" alt="{{ block.alt }}"&gt;
&lt;/a&gt;
</code></pre>

CC BY-SA 3.0
2014-09-17T18:47:04.903Z
2014-09-17T18:47:04.903Z
Brad Bell
<p>Trying to create a page link to entries and can't figure out how to do it.  Here's what I have.  It's just outputting the title, but not the url.  Specifically, I'm talking about <code>{{ block.pageLink.first }}</code> Any help is much appreciated. </p>

<pre><code>{% for block in entry.threeHomepageImages.type('images') %}
    &lt;div class="col"&gt;
        &lt;div class="image-block"&gt;
            &lt;div class="image"&gt;
                {% if block.image|length %}
                    &lt;a href="{{ block.pageLink.first }}"&gt;
                        &lt;img src="images/{{ block.image.first }}.jpg" alt="{{ block.alt }}"&gt;
                    &lt;/a&gt;
                {% endif %}
            &lt;/div&gt;
        &lt;/div&gt;

        &lt;h1&gt;&lt;a href="#"&gt;{{ block.imageTitle }}&lt;/a&gt;&lt;/h1&gt;

    &lt;/div&gt;
{% endfor %}
</code></pre>

CC BY-SA 3.0
2014-09-17T18:00:59.643Z
I assume 'threeHomepageImages' is the Matrix field and 'image' is an Assets field?  What type of field is 'pageLink'?
Brad Bell
CC BY-SA 3.0
2014-09-17T18:27:14.123Z
It's an Entries field...
frshjb373
<matrix><url><entry>
Matrix Entry URL Link
# Matrix Entry URL Link

(Asked by: username_0 on 2014-09-17)

Trying to create a page link to entries and can't figure out how to do it.  Here's what I have.  It's just outputting the title, but not the url.  Specifically, I'm talking about {{ block.pageLink.first }} Any help is much appreciated. 
{% for block in entry.threeHomepageImages.type('images') %}
    
        
            
                {% if block.image|length %}
                    
                        
                    
                {% endif %}
            
        

        {{ block.imageTitle }}

    
{% endfor %}

**Tags:** matrix, url, entry
> **Comments:**
> **username_1**: I assume 'threeHomepageImages' is the Matrix field and 'image' is an Assets field?  What type of field is 'pageLink'?  
> **username_0**: It's an Entries field...  

---

## 1 answers

### Answer by username_1 on 2014-09-17. Score: 4 | Accepted answer

If pageLink is an Entry field and image is an Assets field, then you're probably looking for something like this:


---

