xref: /dokuwiki/inc/Menu/Item/Index.php (revision 368ce258641a4e8fae6b2e49c89f173d7e3ada69)
193b8c351SAndreas Gohr<?php
293b8c351SAndreas Gohr
393b8c351SAndreas Gohrnamespace dokuwiki\Menu\Item;
493b8c351SAndreas Gohr
5*368ce258SAndreas Gohr/**
6*368ce258SAndreas Gohr * Class Index
7*368ce258SAndreas Gohr *
8*368ce258SAndreas Gohr * Shows the sitemap
9*368ce258SAndreas Gohr */
1093b8c351SAndreas Gohrclass Index extends AbstractItem {
1193b8c351SAndreas Gohr
122f7a5efdSAndreas Gohr    protected $svg = DOKU_INC . 'lib/images/menu/file-tree.svg';
132f7a5efdSAndreas Gohr
1493b8c351SAndreas Gohr    /** @inheritdoc */
1593b8c351SAndreas Gohr    public function __construct() {
16*368ce258SAndreas Gohr        global $conf;
17*368ce258SAndreas Gohr        global $ID;
1893b8c351SAndreas Gohr        parent::__construct();
1993b8c351SAndreas Gohr
2093b8c351SAndreas Gohr        $this->accesskey = 'x';
2193b8c351SAndreas Gohr
2293b8c351SAndreas Gohr        // allow searchbots to get to the sitemap from the homepage (when dokuwiki isn't providing a sitemap.xml)
2393b8c351SAndreas Gohr        if($conf['start'] == $ID && !$conf['sitemap']) {
2493b8c351SAndreas Gohr            $this->nofollow = false;
2593b8c351SAndreas Gohr        }
2693b8c351SAndreas Gohr    }
2793b8c351SAndreas Gohr
2893b8c351SAndreas Gohr}
29