latest
  • User Guide
  • Developer Guide
  • Cookbooks
  • Best Practices
  • Reference
    • Modules
    • Actions
    • Controllers
    • Filters
    • Tags
    • Global variables
    • Models
    • Services
      • everything
      • export
      • info
      • media_upload
      • menuexport
      • meta
      • persistent_get
      • persistent_set
      • recompile
      • search
      • submit
      • techempower_json
      • test
    • Validators
    • Directory structure
    • Icons
    • Notifications
    • Installation requirements
    • Configuration
    • The Status site
    • Command-line
    • Transport
    • Troubleshooting
    • EDoc reference
  • Glossary
Zotonic
  • Docs »
  • Reference »
  • Services »
  • menuexport
  • Edit on GitHub

menuexport¶

  • Module: mod_menu

Given an id as input argument, returns a JSON export of the resource’s menu structure.

The JSON returned is a nested list of objects which each contain the pages id, url and, optionally, any children:

[
  {
      "id": 51253,
      "title": "About",
      "url": "/about"
      "children": [
          {
              "id": 51246,
              "title": "Our team",
              "url": "/about/team"
          },
          {
              "id": 51246,
              "title": "Our work ethics",
              "url": "/about/ethics"
          }
      ]
  },
  {
      "id": 51254,
      "title": "Contact",
      "url": "/contact"
  },
  {
      "id": 50497,
      "title": "Blog",
      "url": "/page/333/blog"
  }
]
Next Previous

© Copyright 2009–2017, The Zotonic Project (zotonic.com). Revision 727298a2.

Built with Sphinx using a theme provided by Read the Docs.
Read the Docs v: latest
Versions
latest
stable
0.x
Downloads
pdf
htmlzip
epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.