Changing a menu's target nodes for each page For a Drupal 7 website, I need to have 2 types of menus: 1 menu with a list of countries, each menu entry pointing to a given node. For each country page, I need to display a 'characteristics' menu, with fixed items (e.g. population, incomes), but (of course) the targeted nodes have to be changed in function of the current country. (Clicking on the 'characteristics' menu entries opens a page which is different for each country.)

Is there a module for that in Drupal 7, or a way to do that programmatically?
I found an answer to my question: the best is to use a programmatic approach by using the l() function that is available anywhere within a Drupal installation. It accepts three arguments:


$text: The text that will be visible to users for your link
$path: The URL that the link will go to when clicked.
$options: An associative array which allows to set additional parameters to further customize the link with CSS classes etc…


A good introduction is found here: http://www.pixelclever.com/how-and-why-use-l-function-create-links-drupal-programming.
This function can be used in the template files, or directly from a node body.