<p>I've been getting annoyed at one small problem I can't solve with the Craft Shortlist Plugin. It seems that I have got everything to work but no matter what I do, the {{ item.title }} just won't display the entry title that was added the list the default list.
All the functionality seems to be working no problem but I just simply can't get the item title to appear.</p>

<h2>Code Used to display my list</h2>

<pre><code>{% set lists = craft.shortlist.lists %}

{% if lists is empty %}
    &lt;p&gt;You have no lists at the moment.&lt;/p&gt;
{% else %}

{% for list in lists %}
    &lt;h1&gt;{{ list.title }}&lt;/h1&gt;

    {% if list.items is empty %}
        &lt;p&gt;This list is empty&lt;/p&gt;
    {% else %}

        &lt;ul&gt;
            {% for item in list.items %}
                &lt;p&gt;{{ item.title }}&lt;/p&gt;
            &lt;li&gt;
                &lt;a href="{{ item.removeActionUrl }}"&gt;remove&lt;/a&gt;
                {{ item.id }} &lt;strong&gt;{{ item.title }}&lt;/strong&gt;
            &lt;/li&gt;
            {% endfor %}
        &lt;/ul&gt;

    {% endif %}

{% endfor %}

{% endif %}
</code></pre>

<h2>Code used to give my entries add and remove buttons</h2>

<pre><code>{% for entry in craft.entries.section('locations') %}
  {% set item = craft.shortlist.item(entry.id) %}
  &lt;h2&gt;{{ entry.title }}&lt;/h2&gt;

  {% if item.inList %}
      &lt;a href="{{ item.removeActionUrl }}"&gt;Remove from Favourites&lt;/a&gt;
  {% else %}
      &lt;a href="{{ item.addActionUrl }}"&gt;Add to Favourites&lt;/a&gt;
  {% endif %}
{% endfor %}
</code></pre>

<p>Would really appreaciate the help on this one so let me know if more detail is needed.</p>

CC BY-SA 3.0
2018-02-03T07:18:52.363Z
What happens when you try `{{ item.element.title }}`
Robin Schambach
CC BY-SA 3.0
2018-02-03T13:43:22.800Z
Legend! I spent hours trying to get this to work but never tried that! Thanks so much
leham789
<entries><plugin-shortlist>
Shortlist plugin item title not showing
# Shortlist plugin item title not showing

(Asked by: username_0 on 2018-02-03)

I've been getting annoyed at one small problem I can't solve with the Craft Shortlist Plugin. It seems that I have got everything to work but no matter what I do, the {{ item.title }} just won't display the entry title that was added the list the default list.
All the functionality seems to be working no problem but I just simply can't get the item title to appear.
Code Used to display my list
{% set lists = craft.shortlist.lists %}

{% if lists is empty %}
    You have no lists at the moment.
{% else %}

{% for list in lists %}
    {{ list.title }}

    {% if list.items is empty %}
        This list is empty
    {% else %}

        
            {% for item in list.items %}
                {{ item.title }}
            
                remove
                {{ item.id }} {{ item.title }}
            
            {% endfor %}
        

    {% endif %}

{% endfor %}

{% endif %}

Code used to give my entries add and remove buttons
{% for entry in craft.entries.section('locations') %}
  {% set item = craft.shortlist.item(entry.id) %}
  {{ entry.title }}

  {% if item.inList %}
      Remove from Favourites
  {% else %}
      Add to Favourites
  {% endif %}
{% endfor %}

Would really appreaciate the help on this one so let me know if more detail is needed.

**Tags:** entries, plugin-shortlist

> **Comments:**
> **username_1**: What happens when you try `{{ item.element.title }}`  
> **username_0**: Legend! I spent hours trying to get this to work but never tried that! Thanks so much  

---

## 0 answers

