stable
  • User Guide
  • Developer Guide
  • Cookbooks
  • Best Practices
  • Reference
    • Modules
    • Actions
    • Controllers
    • All dispatch rules
    • Filters
      • Binaries
      • Booleans
      • Dates
      • Encryption
      • Character escaping
      • Forms
      • HTML
      • Lists
      • Mailing list
      • Menu
        • menu_flat
        • menu_is_visible
        • menu_rsc
        • menu_subtree
        • menu_trail
      • Miscellaneous
      • Numbers
      • Regular Expressions
      • Resource lists
      • Resources
      • Strings
      • Survey
      • Translation
      • Tuples
      • Variables
    • Models
    • Services
    • Builtin Tags
    • Custom Tags
    • Validators
    • Directory structure
    • Icons
    • Notifications
    • Installation requirements
    • Global configuration
    • Site configuration
    • The Status site
    • Command-line
    • Transport
    • Troubleshooting
    • EDoc reference
  • Glossary
Zotonic
  • Docs »
  • Reference »
  • Filters »
  • Menu »
  • menu_is_visible
  • Edit on GitHub

menu_is_visible¶

  • Module: mod_menu

Filters a list of menu items on visibility. The is_visible filter can’t be used due to the structure of a menu item list.

Example:

{% with m.rsc.main_menu.menu|menu_is_visible as menu
        {% if menu %}
        <ul>
                {% for id,subids in menu %}
                        <li>{{ id.title }}</li>
                {% endfor %}
        </ul>
        {% endif %}
{% endwith %}
Next Previous

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

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

Free document hosting provided by Read the Docs.