<p>Just use <code>{{ entry.title }}</code> on your dynamic _entry template to output that specific title. You were looping through all the news entries again on the dynamic _entry template and listing each one. Any other custom fields on that page/section can be accessed simply by <code>{{ entry.myCustomFieldName }}</code>.</p>

CC BY-SA 3.0
2017-04-04T11:12:21.687Z
2017-04-04T18:45:28.673Z
2017-04-04T18:45:28.673Z
Shift2Design
<p>I am new at Craft CMS so have patience with me (and my English).</p>

<p>I don't know if I am doing this right, but I have a link (URL) from my index.html, and I want to display the specific content on the _entry.html.</p>

<p>Index.html</p>

<pre><code>{% for entry in craft.entries.section('news') %}
    &lt;h3&gt;&lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;&lt;/h3&gt;
{% endfor %}
</code></pre>

<p>And when I click on that link I want only to display the content related to that <code>entry.url</code>.</p>

<p>If I click the link now, all my entries will show in _entry.html.</p>

<p>_entry.html</p>

<pre><code>{% for entry in craft.entries.section('news').type('news') %}
    &lt;h1&gt;{{ entry.title }}&lt;/h1&gt;
{% endfor %}
</code></pre>

<p>I just want to show the specific content for that section.</p>

<hr>

<p>Update:</p>

<p>I tested this and it worked:</p>

<pre><code>{% for entry in craft.entries.section('news').type('news').slug(craft.request.getSegment(2)) %}
</code></pre>

<p>But I don't know why?</p>

<entries>
Find one section in a for loop based on url
# Find one section in a for loop based on url

(Asked by: username_0 on 2017-04-04)

I am new at Craft CMS so have patience with me (and my English).
I don't know if I am doing this right, but I have a link (URL) from my index.html, and I want to display the specific content on the _entry.html.
Index.html
{% for entry in craft.entries.section('news') %}
    {{ entry.title }}
{% endfor %}

And when I click on that link I want only to display the content related to that entry.url.
If I click the link now, all my entries will show in _entry.html.
_entry.html
{% for entry in craft.entries.section('news').type('news') %}
    {{ entry.title }}
{% endfor %}

I just want to show the specific content for that section.

Update:
I tested this and it worked:
{% for entry in craft.entries.section('news').type('news').slug(craft.request.getSegment(2)) %}

But I don't know why?

**Tags:** entries

---

## 1 answers

### Answer by username_1 on 2017-04-04. Score: 3 | Accepted answer

Just use `{{ entry.title }}` on your dynamic \_entry template to output that specific title. You were looping through all the news entries again on the dynamic \_entry template and listing each one. Any other custom fields on that page/section can be accessed simply by `{{ entry.myCustomFieldName }}`.


---

