<p>There is no predefined 'index' page for channels. Channels are simply a collection of entries. If you want an index page then you will need to create it: either as a <code>single</code>, as an entry within another <code>structure</code>, or as a stand alone template in your templates directory (i.e. <code>craft/templates/news/index.html</code> or <code>craft/templates/news.html</code>). In any case, the url (or uri) is going to be whatever you have defined it as. (i.e. mysite.com/news/). See craft's <a href="http://buildwithcraft.com/docs/routing" rel="nofollow">routing documentation</a> for more info on how requests are routed.</p>

CC BY-SA 3.0
2014-12-15T01:03:16.710Z
2014-12-15T01:03:16.710Z
Douglas McDonald
<p>How can I request the url for a channel index page from another page. I got this message asked on twitter towards craft, but they misunderstood my question.</p>

<p>The came back to me using craft.request.getSegment(x), but this will only work if I would like the index page of a channel when I'm on the entry page of this channel.</p>

<p>But how would I get the url for the "news" channel index page, when I'm in the "projects" channel section (either the index or an entry) of the site?</p>

<p>News is an entry-field of projects btw, so that we can show news related to a project on the site. </p>

CC BY-SA 3.0
2014-11-12T14:31:07.413Z
The channel index page or section landing page will be whatever you define it as in the channel's settings. If your channel is `news` then it will likely be simply `<a href='news'>...<a/>`. Is there something in your question that I am missing?
Douglas McDonald
CC BY-SA 3.0
2014-11-12T14:55:34.983Z
Thanks for the clarification. However, this seems like a duplicate of [your previous question](http://craftcms.stackexchange.com/questions/4688/creating-a-related-content-subpage-to-a-channel-entry) then. Check out that answer and see if it doesn't answer this question also.
Douglas McDonald
CC BY-SA 3.0
2014-11-13T08:14:45.413Z
I don't think these questions are related, as the other one is about creating subpages.
This question is about requesting the slug from craft when I know the channel name, as these 2 obviously don't have to be related or have the same name.
Martijn B.
<templating><entries><url><channels>
Request the url of a channel index
# Request the url of a channel index

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

How can I request the url for a channel index page from another page. I got this message asked on twitter towards craft, but they misunderstood my question.

The came back to me using craft.request.getSegment(x), but this will only work if I would like the index page of a channel when I'm on the entry page of this channel.

But how would I get the url for the "news" channel index page, when I'm in the "projects" channel section (either the index or an entry) of the site?

News is an entry-field of projects btw, so that we can show news related to a project on the site.

**Tags:** templating, entries, url, channels

> **Comments:**
> **username_1**: The channel index page or section landing page will be whatever you define it as in the channel's settings. If your channel is `news` then it will likely be simply `<a href='news'>...<a/>`. Is there something in your question that I am missing?  
> **username_1**: Thanks for the clarification. However, this seems like a duplicate of [your previous question](http://craftcms.stackexchange.com/questions/4688/creating-a-related-content-subpage-to-a-channel-entry) then. Check out that answer and see if it doesn't answer this question also.  
> **username_0**: I don't think these questions are related, as the other one is about creating subpages. This question is about requesting the slug from craft when I know the channel name, as these 2 obviously don't have to be related or have the same name.  

---

## 1 answers

### Answer by username_1 on 2014-12-15. Score: 2

There is no predefined 'index' page for channels. Channels are simply a collection of entries. If you want an index page then you will need to create it: either as a `single`, as an entry within another `structure`, or as a stand alone template in your templates directory (i.e. `craft/templates/news/index.html` or `craft/templates/news.html`). In any case, the url (or uri) is going to be whatever you have defined it as. (i.e. mysite.com/news/). See craft's [routing documentation](http://buildwithcraft.com/docs/routing) for more info on how requests are routed.


---

