<p>As mentioned in the comments on the Question, the solution here is to enclose your desired path with a <code>url()</code> function like so:</p>

<pre><code>&lt;a href="{{ item.addActionUrl({ 'return' : url('my-page-i-want-to-go-to') }) }}"&gt;add item&lt;/a&gt;
</code></pre>

<p>The <code>url()</code> function will take your current <a href="https://craftcms.com/support/site-url" rel="nofollow noreferrer">SiteURL</a> and append the provided path. You can view the offical documentation about <code>url()</code> <a href="https://docs.craftcms.com/v2/templating/functions.html#url" rel="nofollow noreferrer">here</a>.</p>

CC BY-SA 3.0
2018-04-12T02:10:38.237Z
2018-04-12T02:10:38.237Z
Jalen Davenport
<p>working with the <a href="https://transition.topshelfcraft.com/software/craft/shortlist/overview" rel="nofollow noreferrer">Shortlist plugin</a> for Craft.</p>

<p>I'm trying to set the return URL after someone adds an item to their shortlist. </p>

<p>i assume thats what this parameter is for...</p>

<pre><code>&lt;a href="{{ item.addActionUrl({ 'return' : 'my-page-i-want-to-go-to' }) }}"&gt;add item&lt;/a&gt;
</code></pre>

<p>however that takes the user to a 404 page with the url of</p>

<pre><code>mydomain.com/index.php/actions/shortlist/item/my-page-i-want-to-go-to
</code></pre>

<p>any ideas?</p>

CC BY-SA 3.0
2018-04-11T15:45:23.563Z
How about something like `<a href="{{ item.addActionUrl({ 'return' : url('my-page-i-want-to-go-to') }) }}">add item</a>`?
Jalen Davenport
<plugin-shortlist>
Shortlist return URL
# Shortlist return URL

(Asked by: username_0 on 2018-04-11)

working with the Shortlist plugin for Craft.
I'm trying to set the return URL after someone adds an item to their shortlist. 
i assume thats what this parameter is for...
add item

however that takes the user to a 404 page with the url of
mydomain.com/index.php/actions/shortlist/item/my-page-i-want-to-go-to

any ideas?

**Tags:** plugin-shortlist

> **Comments:**
> **username_1**: How about something like `<a href="{{ item.addActionUrl({ 'return' : url('my-page-i-want-to-go-to') }) }}">add item</a>`?  

---

## 1 answers

### Answer by username_1 on 2018-04-12. Score: 1 | Accepted answer

As mentioned in the comments on the Question, the solution here is to enclose your desired path with a url() function like so:
add item

The url() function will take your current SiteURL and append the provided path. You can view the offical documentation about url() here.


---

