---json
{
"aliases": [
{ "path": ":docs:type:home" }
],
"canonical": ":home",
"description": "An index page is the page shown when a namespace is asked in the URL or link path.",
"page_id": "5ni2cs3g6pvlrl1bnjfdm",
"title": "What is a index page ?"
}
---
===== About =====
An ''index'' page is the page shown when a [[docs:page:system:namespace|namespace]] is asked in the [[docs:page:url|URL]] or [[docs:content:link|link]] path.
===== Example =====
A URL asking a namespace will look like that (ie with a backslash ''/'' at the end)
https://foo.com/bar/
If this URL is entered in the Browser, then:
* If there is a page with the [[#startpage|startpage configuration]] name (default to start), the page shown will be
https://foo.com/bar/start
* If there is not a ''start'' page but there is a page with the name of the namespace (ie ''bar''), the page shown will be
https://foo.com/bar/bar
===== Sql Templating =====
In a [[docs:templating:sql|Page Sql]], you can select all index pages with the attribute ''is_index''
Example:
select where is_index = 1 order by path desc limit 4
On this website, this SQL will select the following pages.
select where is_index = 1 order by path asc limit 4
^ Path ^
| [[$path|$path]] |
===== WebSite Home Page =====
The website home page is a special index page that has its own documentation : [[docs:page:system:home]]
===== Template =====
The following [[:docs:theme:template:template|template]] have been created for ''index pages'':
* [[:docs:theme:template:landing|landing]]
* [[:docs:theme:template:index|index]]
* [[:docs:theme:template:index#medium|index-medium]]
These templates don't have the following layout elements:
* [[:docs:theme:element:main-header|main header]]
* [[:docs:theme:element:main-footer|main footer]]
* [[:docs:theme:element:toc|table of content (toc)]]
===== Configuration =====
==== startpage ====
The dokuwiki configuration [[doku>config:startpage]] permits to set the name of the index page. By default, this is ''start'' but an other known name is ''index''.