xref: /dokuwiki/inc/Menu/Item/Index.php (revision 944e9ba7254387adb60f253b0d8796f2276096b1)
1<?php
2
3namespace dokuwiki\Menu\Item;
4
5use dokuwiki\File\StaticImage;
6
7/**
8 * Class Index
9 *
10 * Shows the sitemap
11 */
12class Index extends AbstractItem
13{
14    /** @inheritdoc */
15    public function __construct()
16    {
17        global $conf;
18        global $ID;
19        parent::__construct();
20
21        $this->accesskey = 'x';
22        $this->svg = StaticImage::path('menu/file-tree.svg');
23
24        // allow searchbots to get to the sitemap from the homepage (when dokuwiki isn't providing a sitemap.xml)
25        if ($conf['start'] == $ID && !$conf['sitemap']) {
26            $this->nofollow = false;
27        }
28    }
29}
30