xref: /dokuwiki/inc/Menu/Item/Index.php (revision 33b91513e25639a6c7eb35668484d29098f7c9b4)
193b8c351SAndreas Gohr<?php
293b8c351SAndreas Gohr
393b8c351SAndreas Gohrnamespace dokuwiki\Menu\Item;
493b8c351SAndreas Gohr
5368ce258SAndreas Gohr/**
6368ce258SAndreas Gohr * Class Index
7368ce258SAndreas Gohr *
8368ce258SAndreas Gohr * Shows the sitemap
9368ce258SAndreas Gohr */
10*33b91513SAndreas Gohrclass Index extends AbstractItem
11*33b91513SAndreas Gohr{
1293b8c351SAndreas Gohr
1393b8c351SAndreas Gohr    /** @inheritdoc */
14*33b91513SAndreas Gohr    public function __construct()
15*33b91513SAndreas Gohr    {
16368ce258SAndreas Gohr        global $conf;
17368ce258SAndreas Gohr        global $ID;
1893b8c351SAndreas Gohr        parent::__construct();
1993b8c351SAndreas Gohr
2093b8c351SAndreas Gohr        $this->accesskey = 'x';
214bb2fc4aSAndreas Gohr        $this->svg = DOKU_INC . 'lib/images/menu/file-tree.svg';
2293b8c351SAndreas Gohr
2393b8c351SAndreas Gohr        // allow searchbots to get to the sitemap from the homepage (when dokuwiki isn't providing a sitemap.xml)
2493b8c351SAndreas Gohr        if ($conf['start'] == $ID && !$conf['sitemap']) {
2593b8c351SAndreas Gohr            $this->nofollow = false;
2693b8c351SAndreas Gohr        }
2793b8c351SAndreas Gohr    }
2893b8c351SAndreas Gohr
2993b8c351SAndreas Gohr}
30