Building menus with dynamic items using Menu token

Speakers: 

"Menu token" module is currently known to be installed in more than 10k sites, and growing fast! it provides tokens that could be used in title or in path of menu items (links). For example, if you create a menu item with path: "user/[current-user:uid]", the url will be changed "on fly" to: "user/3" (assuming you are user 3).

Since Tokens are provided by Token module, it allows to use both global and entity tokens: node, user, term, etc. Entity tokens have following methods of substitution: context, random and user defined. It allows to build custom menu blocks that grab tokens from the different entities loaded in a given page view.

Why to attend this session

  • You are a site builder looking for extra powers in order to build dynamic menus without having to code.
  • You were struggling when trying to setup Menu Token and need expert advice.
  • You want to influence the future development of Menu Token for Drupal 8.

Learning Objectives

The objectives of this session are:

  1. Learn common use cases of Menu Token that can benefit your projects.
  2. Learn to troubleshoot common issues when setting up Menu Token.
  3. Have guidelines on how to identify when a code snippet is more practical than Menu Token.
  4. Learn how to setup Menu Token on multi-language sites (l10n and i18n).

Speaker's experience on the field

@develCuy is the original author of Menu Token, releasing the first version of this module for Drupal 5.x, then he managed to incorporate co-maintainers and to include the contributed patches so the module grown up from a "quick hack" into a powerful and flexible solution that is ready for the next step.

BoF after session

Proposed a BoF: The Future of Menu Token and more, for those who want to contribute with ideas.

Previous presentations

This session was presented at previous events:

Schedule info
Experience level: 
Intermediate
Drupal Version: 
Drupal 7.x