{"result":{"depiction_url":null,"edges":{"in_module":{"objects":[{"created":"2020-05-30T05:48:23Z","object_id":{"id":1331,"is_a":["text","documentation","reference","module"],"name":"doc_module_mod_admin","title":"mod_admin","uri":"https:\/\/zotonic.com\/id\/1331"},"seq":1000000}],"predicate":{"id":333,"is_a":["meta","predicate"],"name":"in_module","title":{"_type":"trans","tr":{"en":"In module"}},"uri":"https:\/\/zotonic.com\/id\/in_module"}},"references":{"objects":[{"created":"2020-05-30T05:48:23Z","object_id":{"id":1466,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_admin_menu","title":"observe_admin_menu\/3","uri":"https:\/\/zotonic.com\/id\/1466"},"seq":1000000}],"predicate":{"id":332,"is_a":["meta","predicate"],"name":"references","title":{"_type":"trans","tr":{"en":"References"}},"uri":"https:\/\/zotonic.com\/id\/references"}},"refers":{"objects":[{"created":"2026-09-09T13:48:14Z","object_id":{"id":1466,"is_a":["text","documentation","reference","notification"],"name":"doc_notification_admin_menu","title":"observe_admin_menu\/3","uri":"https:\/\/zotonic.com\/id\/1466"},"seq":1000000}],"predicate":{"id":2409,"is_a":["meta","predicate"],"name":"refers","title":{"_type":"trans","tr":{"en":"Refers"}},"uri":"https:\/\/zotonic.com\/id\/refers"}},"subject":{"objects":[{"created":"2026-09-09T13:48:14Z","object_id":{"id":2555,"is_a":["categorization","keyword","keyword_information_type"],"name":"zotonic_topic_reference","title":"Reference","uri":"https:\/\/zotonic.com\/id\/2555"},"seq":1},{"created":"2026-09-09T13:48:14Z","object_id":{"id":2564,"is_a":["categorization","keyword","keyword_audience"],"name":"zotonic_topic_backend_developer","title":"Backend developer","uri":"https:\/\/zotonic.com\/id\/2564"},"seq":2},{"created":"2026-09-09T13:48:14Z","object_id":{"id":2575,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_navigation","title":"Navigation","uri":"https:\/\/zotonic.com\/id\/2575"},"seq":3},{"created":"2026-09-09T13:48:14Z","object_id":{"id":2583,"is_a":["categorization","keyword","keyword_domain"],"name":"zotonic_topic_user_interface_and_interaction","title":"User interface and interaction","uri":"https:\/\/zotonic.com\/id\/2583"},"seq":4},{"created":"2026-09-09T13:48:14Z","object_id":{"id":2625,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_model","title":"Model","uri":"https:\/\/zotonic.com\/id\/2625"},"seq":5},{"created":"2026-09-09T13:48:14Z","object_id":{"id":2635,"is_a":["categorization","keyword","keyword_architecture"],"name":"zotonic_topic_module","title":"Module","uri":"https:\/\/zotonic.com\/id\/2635"},"seq":6}],"predicate":{"id":308,"is_a":["meta","predicate"],"name":"subject","title":{"_type":"trans","tr":{"en":"Keyword"}},"uri":"http:\/\/purl.org\/dc\/elements\/1.1\/subject"}}},"id":2084,"is_a":["text","documentation","reference","model"],"links":[{"rel":"self","target":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2084"},{"rel":"hub","target":"https:\/\/zotonic.com\/.zotonic\/websub"}],"medium":null,"medium_url":null,"name":"doc_model_model_admin_menu","page_url":{"en":"https:\/\/zotonic.com\/docs\/2084\/admin_menu","x-default":"https:\/\/zotonic.com\/docs\/2084\/admin_menu"},"preview_url":null,"resource":{"version":4001,"pivot_location_lat":null,"title":"admin_menu","is_authoritative":true,"body":"<p>This model holds the admin menu, which is built up by calling each module to add items to the menu.<\/p>\n<p>You can extend the admin menu by observing the <a href=\"\/id\/doc_notification_admin_menu\" class=\"doc-reference doc-reference-notification\"><code>notification#admin_menu<\/code><\/a> notification.<\/p>\n<h2>Menu Item Visibility<\/h2>\n<p>The <code>visiblecheck<\/code> field of <code>#menu_item{}<\/code> and <code>#menu_separator{}<\/code> controls\nwhether an entry is included in the resulting menu. It accepts the following\nvalues:<\/p>\n<table class=\"table\"><thead><tr><th>Value<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>undefined<\/code><\/td><td>Use the default behavior. A menu item is shown when it has a URL or at least one visible non-separator child. Separators are shown.<\/td><\/tr><tr><td><code>true<\/code> or <code>false<\/code><\/td><td>Always show or hide the entry.<\/td><\/tr><tr><td><code>{acl, Action, Object}<\/code><\/td><td>Show the entry when <code>z_acl:is_allowed(Action, Object, Context)<\/code> returns <code>true<\/code>.<\/td><\/tr><tr><td><code>{allof, Checks}<\/code><\/td><td>Show the entry when all recursively evaluated checks succeed.<\/td><\/tr><tr><td><code>{anyof, Checks}<\/code><\/td><td>Show the entry when at least one recursively evaluated check succeeds.<\/td><\/tr><tr><td><code>Checks<\/code><\/td><td>A list of checks is equivalent to <code>{allof, Checks}<\/code>.<\/td><\/tr><tr><td><code>fun(() -&gt; boolean())<\/code><\/td><td>Evaluate a zero-argument visibility function.<\/td><\/tr><tr><td><code>fun((z:context()) -&gt; boolean())<\/code><\/td><td>Evaluate a visibility function with the current context.<\/td><\/tr><\/tbody><\/table>\n<p>Checks can be nested. For example, the following entry is visible when the\nuser may use either module:<\/p>\n<pre class=\"notranslate\"><code class=\"notranslate language-erlang\">#menu_item{\n    id = admin_example,\n    parent = admin_structure,\n    label = ?__(&quot;Example&quot;, Context),\n    url = admin_example,\n    visiblecheck = {anyof, [\n        {acl, use, mod_example},\n        {acl, use, mod_admin_config}\n    ]}\n}\n<\/code><\/pre>\n<p><code>visiblecheck<\/code> only controls menu visibility. The target controller, model,\nand event handlers must perform their own authorization checks.<\/p>\n<h2>Available Model API Paths<\/h2>\n<table class=\"table\"><thead><tr><th>Method<\/th><th>Path pattern<\/th><th>Description<\/th><\/tr><\/thead><tbody><tr><td><code>get<\/code><\/td><td><code>\/<\/code><\/td><td>Return the full admin menu tree for the current context (<code>menu\/1<\/code>), including nested items, resolved URLs, sorting, and visibility filtering. No further lookups.<\/td><\/tr><tr><td><code>get<\/code><\/td><td><code>\/menu\/...<\/code><\/td><td>Return the admin menu tree built from <code>#admin_menu<\/code> notifications, filtered by ACL\/visible checks and organized into parent-child hierarchy.<\/td><\/tr><\/tbody><\/table>\n<p><code>\/+name<\/code> marks a variable path segment. A trailing <code>\/...<\/code> means extra path segments are accepted for further lookups.<\/p>","slug":"admin_menu","is_protected":false,"visible_for":0,"tz":"UTC","language":["en"],"doc_source_hash":"47e92f4d1973444f9d93907a4de0402a583bb5978dc08b3bc9ece6e5b3ec2daa","is_featured":false,"content_group_id":{"id":2551,"is_a":["meta","content_group"],"name":"content_group_imported_docs","title":"Imported documentation","uri":"https:\/\/zotonic.com\/id\/content_group_imported_docs"},"category_id":{"id":322,"is_a":["meta","category"],"name":"model","title":"Models","uri":"https:\/\/test.zotonic.com\/id\/322"},"doc_source_path":"apps\/zotonic_mod_admin\/src\/models\/m_admin_menu.erl","publication_start":"2023-06-24T08:17:45Z","github_url":"https:\/\/github.com\/zotonic\/zotonic\/blob\/master\/apps\/zotonic_mod_admin\/src\/models\/m_admin_menu.erl","pivot_location_lng":null,"doc_source_kind":"model","name":"doc_model_model_admin_menu","is_unfindable":false,"is_published":true,"pivot_geocode":null,"created":"2020-05-30T05:47:57Z","uri":null,"doc_status":"current","is_dependent":false,"erlang_app":"zotonic_mod_admin","publication_end":"9999-06-01T00:00:00Z","modifier_id":{"id":1,"is_a":["person"],"name":"administrator","title":"Site Administrator","uri":"https:\/\/zotonic.com\/id\/1"},"privacy":0,"doc_source_commit":"66cb145eae7002b184e7d8c4c7bba5e53e8248e5\n","erlang_module":"m_admin_menu","creator_id":{"id":336,"is_a":["person","robot"],"name":"gitbot","title":"Git","uri":"https:\/\/zotonic.com\/id\/336"},"modified":"2026-10-02T12:40:37Z","title_slug":"admin_menu"},"uri":"https:\/\/zotonic.com\/id\/2084","uri_template":"https:\/\/zotonic.com\/id\/:id","websub":{"hub":"https:\/\/zotonic.com\/.zotonic\/websub","topic":"https:\/\/zotonic.com\/.zotonic\/websub\/topic\/2084"}},"status":"ok"}