Find one section in a for loop based on url 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') %}
    &lt;h3&gt;&lt;a href="{{ entry.url }}"&gt;{{ entry.title }}&lt;/a&gt;&lt;/h3&gt;
{% 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') %}
    &lt;h1&gt;{{ entry.title }}&lt;/h1&gt;
{% 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?
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 }}.