Menu LInk

Zyxware default image1
| 1 min read
In one of our Drupal 7 sites, recently, we came across a situation where we wanted to set a menu link that redirects users to different pages based on their roles. Usually, we create separate menu items for each user and apply permissions based on their roles. However,since we wanted to avoid redundant menu items and didn't want to duplicate an entire menu branch for a shared parent menu item, we decided to set single menu item with different pointing locations. Here is how we achieved it.
Zyxware default image2
| 3 min read
In Drupal 6, when you are working on a new project and when you change menu items from MENU_NORMAL_ITEMS to MENU_LOCAL_TASK or vice versa you will run into a scenario where the menu_links table entries won't get changed. This can get reflected in menu_links not appearing in your system_admin_menu_block_page listing if you are using it for listing your menu items in a page. The solution is to rebuild the menu_links table for the menu items corresponding to your menu_router items. The solution is simple.
Zyxware default image1
| 2 min read
On a Drupal site, when setting up pathauto for nodes, sometimes it is useful to have the full nested path of parent terms of the channel (or primary vocabulary) for the article in the url alias to give the impression of a directory structure to the taxonomy vocabulary. This will allow users to see urls to nodes like domain/term1/term2/term3/node-title-or-whatever where term3 is the channel under which the article is published.