<p>I have solved the issue.</p>
<p>Im new to craft so I was not 100% sure what needed to be done but I figured out I needed to make a loop because the array.</p>
<p>This is what I changed:
I changed this part {{ entry.locationLink.first }}</p>
<p>To:        {% for location in entry.locationLink %} {{ location.title }}</p>
<p>That listed all my locations, then I added below to comma separate them.</p>
<pre><code>       {% if loop.last == false  %},{% endif%} {{item}}
       
       {% endfor %}
</code></pre>
<p>I hope this helps others. Thanks Brad for trying.</p>

CC BY-SA 4.0
2023-01-19T16:16:44.747Z
2023-01-19T16:16:44.747Z
Goodie
<p>I'm having trouble trying to display all entries in my list.</p>
<p>This code is working fine to grab the first entry.</p>
<pre><code>{% for entry in craft.entries.section('positions') %}
    &lt;li class=&quot;list-item-career tooltip&quot;&gt;
        &lt;div class=&quot;list-item__title&quot; style=&quot;padding: 15px 0px;&quot;&gt;
            &lt;div class=&quot;col-6&quot;&gt;{{ entry.title }}&lt;/div&gt;
            &lt;div class=&quot;col-6&quot;&gt;{{ entry.locationLink.first }}&lt;/div&gt;
        &lt;/div&gt;
    &lt;/li&gt;
</code></pre>
<p>If I change <code>.first</code> to <code>.last</code> I get the last one just fine as well, so <code>.last</code> works.</p>
<p>If I change to <code>.all()</code>,  I get the error:</p>
<blockquote>
<p>Object of class Craft\ElementCriteriaModel could not be converted to string.</p>
</blockquote>
<p>When I change to <code>entry.locationLink.find()</code>, I get this error:</p>
<blockquote>
<p>Array to string conversion</p>
</blockquote>
<p>Can someone please help me figure out what I must do to give my complete list of 5 to display?</p>
<p>Thank you in advance for any light someone can provide.</p>

CC BY-SA 4.0
2023-01-18T17:01:21.520Z
What type of field is `locationLink`? And what version of Craft are you running?
Ben Croker
CC BY-SA 4.0
2023-01-19T15:31:26.700Z
Hello, thanks for getting back to me,. I have a page I made for jobs,. and I list the job positions and then what cities have a opening. In this case I have a field called:  Location Link, and its handle is  "locationLink" 

Then in my Entries I have "job positions" where I can add the locations.  Here I can add up to 5 (what I set it for). Then on my jobs page it shows postions and citys..

Currently it is only showing the first ciyt or last one in the list if I change my code to .last. I just cant seem to get them all to list :(
Goodie
CC BY-SA 4.0
2023-01-19T15:37:03.773Z
Im using Craft 2.9.2
Goodie
CC BY-SA 4.0
2023-01-19T15:39:36.273Z
I also have a entry section called locations when I added all the cities.
Goodie
CC BY-SA 4.0
2023-01-20T01:35:45.140Z
Craft v2 is no longer supported, I'd suggest you update to at least v3, ideally v4.
Ben Croker
<craft2>
Pulling all entries
# Pulling all entries

(Asked by: username_0 on 2023-01-18)

I'm having trouble trying to display all entries in my list.
This code is working fine to grab the first entry.
{% for entry in craft.entries.section('positions') %}
    
        
            {{ entry.title }}
            {{ entry.locationLink.first }}
        
    

If I change .first to .last I get the last one just fine as well, so .last works.
If I change to .all(),  I get the error:

Object of class Craft\ElementCriteriaModel could not be converted to string.

When I change to entry.locationLink.find(), I get this error:

Array to string conversion

Can someone please help me figure out what I must do to give my complete list of 5 to display?
Thank you in advance for any light someone can provide.

**Tags:** craft2
> **Comments:**
> **username_1**: What type of field is `locationLink`? And what version of Craft are you running?  
> **username_0**: Hello, thanks for getting back to me,. I have a page I made for jobs,. and I list the job positions and then what cities have a opening. In this case I have a field called:  Location Link, and its handle is  "locationLink"   Then in my Entries I have "job positions" where I can add the locations.  Here I can add up to 5 (what I set it for). Then on my jobs page it shows postions and citys..  Currently it is only showing the first ciyt or last one in the list if I change my code to .last. I just cant seem to get them all to list :(  
> **username_0**: Im using Craft 2.9.2  
> **username_0**: I also have a entry section called locations when I added all the cities.  
> **username_1**: Craft v2 is no longer supported, I'd suggest you update to at least v3, ideally v4.  

---

## 1 answers

### Answer by username_0 on 2023-01-19. Score: 1

I have solved the issue.
Im new to craft so I was not 100% sure what needed to be done but I figured out I needed to make a loop because the array.
This is what I changed:
I changed this part {{ entry.locationLink.first }}
To:        {% for location in entry.locationLink %} {{ location.title }}
That listed all my locations, then I added below to comma separate them.
       {% if loop.last == false  %},{% endif%} {{item}}
       
       {% endfor %}

I hope this helps others. Thanks Brad for trying.


---

