描述
地址: /nv/get_nav_menu
方法: POST
参数
name
(String) (Optional)
返回指定的菜单名称,无参数则返回所有菜单
names
(Array) (Optional)
返回指定的多个菜单,无参数则返回所有菜单
raw
(Boolean) (Optional)
返回原始菜单数据(将包含已失效的链接)
返回
示例
{
"topNav": [
{
"label": "Home",
"url": "/",
"opennew": false,
"type": "url"
},
{
"label": "Blog",
"url": "http://baidu.com",
"opennew": false,
"type": "url",
"children": [
{
"label": "设计",
"url": "#",
"opennew": false,
"type": "url",
"children": [
{
"label": "壁纸",
"id": 9,
"opennew": false,
"type": "term",
"error": false,
"taxonomy": "category",
"term_slug": "wallpapper",
"url": "/category/wallpapper/"
},
{
"label": "图标",
"id": 11,
"opennew": false,
"type": "term",
"error": false,
"taxonomy": "category",
"term_slug": "icons",
"url": "/category/icons/"
},
{
"label": "皮肤",
"id": 14,
"opennew": false,
"type": "term",
"error": false,
"taxonomy": "category",
"term_slug": "skin",
"url": "/category/skin/"
}]
},
{
"label": "教程",
"id": 6,
"opennew": false,
"type": "term",
"error": false,
"taxonomy": "category",
"term_slug": "teach",
"url": "/category/teach/"
}]
},
{
"label": "Guestbook",
"id": 2,
"opennew": false,
"type": "post",
"error": false,
"post_type": "page",
"post_slug": "guestbook",
"url": "/guestbook/"
},
{
"label": "sample",
"id": 10,
"opennew": false,
"type": "post",
"error": false,
"post_type": "article",
"post_slug": "%E5%B0%86ios%E5%A4%87%E4%BB%BD%E8%BF%81%E7%A7%BB%E5%88%B0nas",
"url": "/%E5%B0%86ios%E5%A4%87%E4%BB%BD%E8%BF%81%E7%A7%BB%E5%88%B0nas/"
}],
"catNav": [
{
"label": "首页",
"url": "/",
"opennew": false,
"type": "url"
},
{
"label": "全部文章",
"url": "/articles",
"opennew": false,
"type": "url"
},
{
"label": "设计",
"id": 17,
"opennew": false,
"type": "term",
"children": [
{
"label": "皮肤",
"id": 14,
"opennew": false,
"type": "term",
"error": false,
"taxonomy": "category",
"term_slug": "skin",
"url": "/category/skin/"
},
{
"label": "图标",
"id": 11,
"opennew": false,
"type": "term",
"error": false,
"taxonomy": "category",
"term_slug": "icons",
"url": "/category/icons/"
}],
"error": false,
"taxonomy": "category",
"term_slug": "design",
"url": "/category/design/"
},
{
"label": "壁纸",
"id": 9,
"opennew": false,
"type": "term",
"error": false,
"taxonomy": "category",
"term_slug": "wallpapper",
"url": "/category/wallpapper/"
},
{
"label": "教程",
"id": 6,
"opennew": false,
"type": "term",
"error": false,
"taxonomy": "category",
"term_slug": "teach",
"url": "/category/teach/"
}]
}