Drupal站点地图模块

Gra*_*ton 6 drupal

我正在寻找一个可以在Drupal中创建站点地图的模块,但找不到任何模块.我试过Site Map模块,但它只能生成一个站点地图页面; 它无法在每个页面的末尾创建一个站点地图块.我也尝试过网站菜单模块,但它也无法创建如上图所示的站点地图块.

也许这只是我不知道如何配置,但我读了每个自述文件,并尝试了几天,仍然无法让它工作.

任何人有任何想法?

Elm*_*ber 11

我遇到了同样的问题,在尝试了一个模块(站点地图)但缺少自定义选项后,我编写了一个自定义模块.花费更少的时间然后搞乱站点地图模块,只需获取站点地图以下代码就足够了(调整你的菜单):

function sitemap_render_menu ($menu) {
    $output = "<ul>";
    foreach ($menu as $item) {
    $link = $item["link"];
    if ($link["hidden"]) {
        continue;
    }

    $output .= "<li><a href=\"" . check_url(url($link["href"], $link["options"])) . "\">" . $link["title"] . "</a></li>";

    if ($item["below"]) {
        $output .= sitemap_render_menu($item["below"]);
    }
    }

    $output .= "</ul>";
    return $output;
}

function sitemap_content () {
    $output = "<h1>Sitemap</h1>";
    $output .= "<span id=\"sitemap\">";
    $output .= sitemap_render_menu(menu_tree_all_data("your-menu"));
    $output .= "</span>";
    return $output;
}


function sitemap_menu () {
    $items = array();

    $items["sitemap"] = array (
        "title" => "Sitemap",
        "page callback" => "sitemap_content",
        "access arguments" => array("access content"),
        "type" => MENU_CALLBACK);

    return $items;
}
Run Code Online (Sandbox Code Playgroud)


gre*_*les 5

http://groups.drupal.org/node/15980对站点地图模块进行了基本比较

我使用过sitemenu并且它可以满足我的需求,但真正的答案取决于你如何使用分类法,内容类型等构建网站.