<p>As a shorthand, you could also use <a href="http://buildwithcraft.com/docs/reference-tags" rel="nofollow noreferrer">Reference Tags</a> along with the <code>parseRefs</code> filter, like this:</p>

<pre><code>&lt;a href="{{ '{entry:123:url}' | parseRefs }}"&gt;Request a Quote&lt;/a&gt;
</code></pre>

<p><em>(Similar question/answer posted <a href="https://craftcms.stackexchange.com/questions/769/how-do-i-create-a-link-to-an-entry-using-entrys-id">here</a>.)</em></p>

CC BY-SA 3.0
2015-02-01T18:41:04.440Z
Question about whether this is performant, posted here: [http://craftcms.stackexchange.com/questions/6906/linking-to-specific-entries-in-twig-how-performant-is-reference-tags-parsing](http://craftcms.stackexchange.com/questions/6906/linking-to-specific-entries-in-twig-how-performant-is-reference-tags-parsing)
Michael Rog
CC BY-SA 3.0
2015-02-01T18:23:56.453Z
2015-02-01T18:23:56.453Z
2017-04-13T12:51:00.200Z
Michael Rog
<p>First, you'll want to retrieve that entry specifically...</p>

<pre><code>{% set entry = craft.entries.slug('get-a-quote').first %}
</code></pre>

<p>Once you've got the entry that you want to target, you can easily link to it like this:</p>

<pre><code>&lt;a href="{{ entry.url }}" class="btn-quote"&gt;request a quote&lt;/a&gt;
</code></pre>

CC BY-SA 3.0
2014-09-23T20:22:18.167Z
For some reason when I use the code above, it's not outputting the entry field below.  I created another discussion regarding the issue. Here's a [link](http://craftcms.stackexchange.com/questions/2685/entry-field-not-outputting-after-set-code-in-template?noredirect=1#comment3951_2685).  Maybe you can help me figure it out.  Thanks!
frshjb373
CC BY-SA 3.0
2014-09-23T20:46:06.207Z
Just left an answer on that thread... Looks like you'll need a different variable name than "entry" (since "entry" is already taken).
Lindsey D
CC BY-SA 3.0
2014-09-21T01:23:10.403Z
2014-09-21T01:23:10.403Z
Lindsey D
<p>I have the following code and I'm looking for the best way to link to another entry page.</p>

<pre><code>&lt;a href="#" class="btn-quote"&gt;request a quote&lt;/a&gt;
</code></pre>

<p>I tried something like this with no luck:</p>

<pre><code>&lt;a href="{{ entry.getLink('Get a Quote') }}" class="btn-quote"&gt;request a quote&lt;/a&gt;
</code></pre>

<p>Here's the entry: <a href="http://grab.by/Ax6s" rel="nofollow">http://grab.by/Ax6s</a></p>

<p>Thanks in advance for the help.</p>

<templating><url><entry>
What's the best way to link to an entry in a template?
# What's the best way to link to an entry in a template?

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

I have the following code and I'm looking for the best way to link to another entry page.
request a quote

I tried something like this with no luck:
request a quote

Here's the entry: http://grab.by/Ax6s
Thanks in advance for the help.

**Tags:** templating, url, entry


---

## 2 answers

### Answer by username_2 on 2014-09-21. Score: 4 | Accepted answer

First, you'll want to retrieve that entry specifically...
{% set entry = craft.entries.slug('get-a-quote').first %}

Once you've got the entry that you want to target, you can easily link to it like this:
request a quote

> **Comments:**
> **username_0**: For some reason when I use the code above, it's not outputting the entry field below.  I created another discussion regarding the issue. Here's a [link](http://craftcms.stackexchange.com/questions/2685/entry-field-not-outputting-after-set-code-in-template?noredirect=1#comment3951_2685).  Maybe you can help me figure it out.  Thanks!  
> **username_2**: Just left an answer on that thread... Looks like you'll need a different variable name than "entry" (since "entry" is already taken).  

---

### Answer by username_1 on 2015-02-01. Score: 2

As a shorthand, you could also use Reference Tags along with the parseRefs filter, like this:
Request a Quote

(Similar question/answer posted here.)

> **Comments:**
> **username_1**: Question about whether this is performant, posted here: [http://craftcms.stackexchange.com/questions/6906/linking-to-specific-entries-in-twig-how-performant-is-reference-tags-parsing](http://craftcms.stackexchange.com/questions/6906/linking-to-specific-entries-in-twig-how-performant-is-reference-tags-parsing)  

---

