<p>The reason why there's no automatically set url and template for channel index pages is because Craft tries to be as flexible as possible. In many use cases for channel sections you don't want a index page at all or you could also need multiple of them.</p>

<p>But you already chose a very solid approach by setting up a structure section for your navigation. And no, you don't have to create useless singles for each channel index. I'd rather use entries of that structure itself and would just set up a new entry type for your indexes. See <a href="http://buildwithcraft.com/help/entry-type-templates" rel="nofollow noreferrer">this article</a> in the Craft Docs on how to link templates to entry types.</p>

<p>I think it's really nice to have all the site main pages together in one structure. You can easily add fields to your index pages and have your client edit all this rather static content in here.</p>

<p>You can also add you home page to that structure. See <a href="https://craftcms.stackexchange.com/questions/1467/add-home-page-to-a-structure">this Q/A</a> for how to do that.</p>

CC BY-SA 3.0
2014-11-13T11:38:35.833Z
2014-11-13T11:38:35.833Z
2017-04-13T12:51:00.160Z
carlcs
<p>Craft is very flexible about what you can display where. You can display channel or structure entries virtually anywhere using:</p>

<pre><code>{% for entry in craft.entries.section('mySectionHandle') %}
    {{ entry.title }}
    etc ...
{% endfor %}
</code></pre>

<p>Just paste this into one of your structure templates (or any template). If you only want it to display in one structure entry, then you can place a conditional in that template that only displays the content based on a specific uri segment or the defined <code>Entry Type</code> for that page/entry or both.</p>

<p>To check for uri segment:</p>

<pre><code>{% if craft.request.getSegment(2) == "mySection" %}...{% endif %}
</code></pre>

<p>to check for entry type:</p>

<pre><code>{% if entry.type == "myEntryType" %}...{% endif %}
</code></pre>

<p><strong>Update</strong> You can also just create an index page in your templates folder in that sections folder (i.e. '/craft/templates/mysection/index.html') and link to that directly (i.e. <code>&lt;a href="mysection"&gt;mysection title&lt;/a&gt;</code>).</p>

CC BY-SA 3.0
2014-11-12T21:10:07.593Z
Yes, that's pretty basic but that's not my point. Let me try to be more clear. Your method is how i do things now. I make a single and a channel and i fetch all entries from my channel in my single template. But that requires me to have a single AND a channel. It should be possible to do this without the single. The solution to this is to just be able to link to channels and a template for that channel in a structure. I hope I'm a bit more clear now? :)
Tom De Smet
CC BY-SA 3.0
2014-11-12T21:15:41.837Z
Channels do not have an index or landing page by default. You need to create one. But that index or landing page does not have to be a single, it can be a specific entry in your existing structure. It can also just exist as an index.php file in your templates folder (i.e. mysection/index.html).
Douglas McDonald
CC BY-SA 3.0
2014-11-12T21:47:42.380Z
Hmmm. Need to take a closer look at structures. Thanks for your answer, i'm going to do some testing.
Tom De Smet
CC BY-SA 3.0
2014-11-12T22:07:53.740Z
Have a look at `Entry Types` in particular. They allow you to combine vastly different types of content within the same structure. And you can create a clause or include different sub-templates to display that content by checking `entry.type`.
Douglas McDonald
CC BY-SA 3.0
2014-11-12T22:12:15.190Z
Yes, I see what you mean now. Instead of listing singles into a structure to use as my navigation, I could of used different entry types in my structure. But the "problem" if I may call it that, stays the same. I still need another sort of page (being a single or a structure entry) to list all my channel entries on. Wouldn't it be usefull if a channel could have a channel index or something that you can point to from a structure? Like my original idea? There are multiple ways to do what I want to be done, but it still involves adding one extra structure page or single section that shouldn't be
Tom De Smet
CC BY-SA 3.0
2014-11-12T23:31:46.097Z
Well. You can just create an index.html template and put it in the sections template folder. Craft will pick that up by default if you just link to the section name. In fact you can link to any `folder/index.html` in the templates folder. They don't have to be defined in the CMS at all.
Douglas McDonald
CC BY-SA 3.0
2014-11-13T06:26:59.173Z
Yes i thought about that but i have a multilingual site and would like to have the segments translated. I can't do that by linking directly to a template can i? That's why i use singles now so i can choose the translated segment name myself. Else, the segment would just be the template name in all languages. Hence my request for a channel index page. I'm not sure that would work with a structure also?
Tom De Smet
CC BY-SA 3.0
2014-11-13T11:15:00.467Z
@Tom yes, you can have translated urls / segments and also translated slugs with a structure. But you probably set the url to root `/` anyways if you use the structure for your index pages and navigation.
carlcs
CC BY-SA 3.0
2014-11-12T20:25:24.980Z
2014-11-12T21:22:40.977Z
2014-11-12T21:22:40.977Z
Douglas McDonald
<p>I come from expression engine and what I want to do is the following: I have a channel filled with entries. All I want to do is to list all these entries on a page.
However, I don't want to link through to a detail page. So I disable the "Entries have their own URL's".</p>

<p>Now I can link to this channel by linking to its handle in my url.</p>

<p>Problem now is that I use a structure to build up my navigation. And you can't link to a channel in a structure, only to its entries. So I need to create a (useless) extra single section to link to and list all entries from my channel in that single.
Shouldn't it be simpler than that?</p>

<p>I didn't find a better way to handle navigations yet.</p>

CC BY-SA 3.0
2014-11-13T11:45:26.213Z
No duplicate in my opinion, but very similar and probably helpful for you, Tom: ["Is there a better way to localise channel url?"](http://craftcms.stackexchange.com/q/4299/125).
carlcs
<templating><structure><channels>
Channel index page linked in a structure
# Channel index page linked in a structure

(Asked by: username_0 on 2014-11-12)

I come from expression engine and what I want to do is the following: I have a channel filled with entries. All I want to do is to list all these entries on a page.
However, I don't want to link through to a detail page. So I disable the "Entries have their own URL's".

Now I can link to this channel by linking to its handle in my url.

Problem now is that I use a structure to build up my navigation. And you can't link to a channel in a structure, only to its entries. So I need to create a (useless) extra single section to link to and list all entries from my channel in that single.
Shouldn't it be simpler than that?

I didn't find a better way to handle navigations yet.

**Tags:** templating, structure, channels
> **Comments:**
> **username_1**: No duplicate in my opinion, but very similar and probably helpful for you, Tom: ["Is there a better way to localise channel url?"](http://craftcms.stackexchange.com/q/4299/125).  

---

## 2 answers

### Answer by username_1 on 2014-11-13. Score: 2 | Accepted answer

The reason why there's no automatically set url and template for channel index pages is because Craft tries to be as flexible as possible. In many use cases for channel sections you don't want a index page at all or you could also need multiple of them.

But you already chose a very solid approach by setting up a structure section for your navigation. And no, you don't have to create useless singles for each channel index. I'd rather use entries of that structure itself and would just set up a new entry type for your indexes. See [this article](http://buildwithcraft.com/help/entry-type-templates) in the Craft Docs on how to link templates to entry types.

I think it's really nice to have all the site main pages together in one structure. You can easily add fields to your index pages and have your client edit all this rather static content in here.

You can also add you home page to that structure. See [this Q/A](https://craftcms.stackexchange.com/questions/1467/add-home-page-to-a-structure) for how to do that.


---

### Answer by username_2 on 2014-11-12. Score: 1

Craft is very flexible about what you can display where. You can display channel or structure entries virtually anywhere using:
{% for entry in craft.entries.section('mySectionHandle') %}
    {{ entry.title }}
    etc ...
{% endfor %}

Just paste this into one of your structure templates (or any template). If you only want it to display in one structure entry, then you can place a conditional in that template that only displays the content based on a specific uri segment or the defined Entry Type for that page/entry or both.
To check for uri segment:
{% if craft.request.getSegment(2) == "mySection" %}...{% endif %}

to check for entry type:
{% if entry.type == "myEntryType" %}...{% endif %}

Update You can also just create an index page in your templates folder in that sections folder (i.e. '/craft/templates/mysection/index.html') and link to that directly (i.e. mysection title).

> **Comments:**
> **username_0**: Yes, that's pretty basic but that's not my point. Let me try to be more clear. Your method is how i do things now. I make a single and a channel and i fetch all entries from my channel in my single template. But that requires me to have a single AND a channel. It should be possible to do this without the single. The solution to this is to just be able to link to channels and a template for that channel in a structure. I hope I'm a bit more clear now? :)  
> **username_2**: Channels do not have an index or landing page by default. You need to create one. But that index or landing page does not have to be a single, it can be a specific entry in your existing structure. It can also just exist as an index.php file in your templates folder (i.e. mysection/index.html).  
> **username_0**: Hmmm. Need to take a closer look at structures. Thanks for your answer, i'm going to do some testing.  
> **username_2**: Have a look at `Entry Types` in particular. They allow you to combine vastly different types of content within the same structure. And you can create a clause or include different sub-templates to display that content by checking `entry.type`.  
> **username_0**: Yes, I see what you mean now. Instead of listing singles into a structure to use as my navigation, I could of used different entry types in my structure. But the "problem" if I may call it that, stays the same. I still need another sort of page (being a single or a structure entry) to list all my channel entries on. Wouldn't it be usefull if a channel could have a channel index or something that you can point to from a structure? Like my original idea? There are multiple ways to do what I want to be done, but it still involves adding one extra structure page or single section that shouldn't be  
> **username_2**: Well. You can just create an index.html template and put it in the sections template folder. Craft will pick that up by default if you just link to the section name. In fact you can link to any `folder/index.html` in the templates folder. They don't have to be defined in the CMS at all.  
> **username_0**: Yes i thought about that but i have a multilingual site and would like to have the segments translated. I can't do that by linking directly to a template can i? That's why i use singles now so i can choose the translated segment name myself. Else, the segment would just be the template name in all languages. Hence my request for a channel index page. I'm not sure that would work with a structure also?  
> **username_1**: @Tom yes, you can have translated urls / segments and also translated slugs with a structure. But you probably set the url to root `/` anyways if you use the structure for your index pages and navigation.  

---

