How can I create a path auto pattern token based on a menu path without placing node in menu? Here is the scenario:

We have a D7 multisite set up with an installation profile that we created so that all sites are basically managed with the same rules. But we do allow some flexibility... So we have a content type "News Article". Usually news articles won't be in the menu because there can be thousands of news articles on any given site. One site might want to put their news articles under the "News" menu item in the main menu. Some might call it "News Room". Since we're not forcing the parent path, I can't set "news" as a root path for all the nodes in path auto. And even more crazy, some site users might chose to place node A under News while node B is under About. I was thinking of some type of menu "parent" selector as if they were creating a menu item, without creating the actual menu item in order to generate the path. I thought the menu position module might be on the path I needed, but it turns out you have to create rules administratively and not on a per-node basis where the user is making the determination.
With the use of the Menu Reference module and hook_pattern_alter, I was able to get this accomplished. The code piece ended up looking like:

function custom_paths_pathauto_pattern_alter(&amp;$pattern, array &amp;$context) {
  if (isset($context['type']) &amp;&amp; $context['type'] == 'news_article' &amp;&amp; isset($context['data']['node']) &amp;&amp; !$context['data']['node']-&gt;menu['enabled'] &amp;&amp; $context['data']['node']-&gt;field_menu_path['und'][0]['mlid']) {
    $menuitem = menu_link_load($context['data']['node']-&gt;field_menu_path['und'][0]['mlid']);
    $menupath = drupal_get_path_alias($menuitem['link_path']);
    $pattern = $menupath . '/[node:title]';
  }
}