<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	>
<channel>
	<title>Comments for TouchDesk</title>
	<atom:link href="http://www.touchdesk.nl/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.touchdesk.nl</link>
	<description>Science, Business, Engineering</description>
	<pubDate>Mon, 21 May 2012 00:38:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comment on Full Menu Tree with Active Trail in Drupal 6 by Bas</title>
		<link>http://www.touchdesk.nl/2009/04/full-menu-tree-with-active-trail-in-drupal-6/comment-page-1/#comment-114</link>
		<dc:creator>Bas</dc:creator>
		<pubDate>Fri, 24 Feb 2012 16:57:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.touchdesk.nl/?p=54#comment-114</guid>
		<description>Boo for not supporting tabs!</description>
		<content:encoded><![CDATA[<p>Boo for not supporting tabs!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Full Menu Tree with Active Trail in Drupal 6 by Bas</title>
		<link>http://www.touchdesk.nl/2009/04/full-menu-tree-with-active-trail-in-drupal-6/comment-page-1/#comment-113</link>
		<dc:creator>Bas</dc:creator>
		<pubDate>Fri, 24 Feb 2012 16:57:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.touchdesk.nl/?p=54#comment-113</guid>
		<description>Another option for Drupal 7:

&lt;code&gt;
/**
 * Sets an active trail to a menu tree (@see menu_tree_all_data)
 * @param Array $tree
 * @param $menu_link	A menu link
 */
function _example_menu_tree_set_active_trail(&amp;$tree, $menu_link) {
	//Set active trail
	$mlids = array();
	for ($i = 1; $i &lt; 10; $i++) $mlids[] = $menu_link['p' . $i];
	
	//Start recursive checking per branch
	foreach (array_keys($tree) as $key) {
		__example_menu_tree_set_active_trail($tree[$key], $mlids);
	}	
}

function __example_menu_tree_set_active_trail(&amp;$branch, $mlids) {
	if (in_array($branch['link']['mlid'], $mlids)) {
		$branch['link']['in_active_trail'] = TRUE;
		
		foreach (array_keys($branch['below']) as $key) {
			__example_menu_tree_set_active_trail($branch['below'][$key], $mlids);
		}
	}
}
&lt;/code&gt;

I think this function should be added to core.</description>
		<content:encoded><![CDATA[<p>Another option for Drupal 7:</p>
<p><code><br />
/**<br />
 * Sets an active trail to a menu tree (@see menu_tree_all_data)<br />
 * @param Array $tree<br />
 * @param $menu_link	A menu link<br />
 */<br />
function _example_menu_tree_set_active_trail(&amp;$tree, $menu_link) {<br />
	//Set active trail<br />
	$mlids = array();<br />
	for ($i = 1; $i &lt; 10; $i++) $mlids[] = $menu_link['p' . $i];</p>
<p>	//Start recursive checking per branch<br />
	foreach (array_keys($tree) as $key) {<br />
		__example_menu_tree_set_active_trail($tree[$key], $mlids);<br />
	}<br />
}</p>
<p>function __example_menu_tree_set_active_trail(&amp;$branch, $mlids) {<br />
	if (in_array($branch['link']['mlid'], $mlids)) {<br />
		$branch['link']['in_active_trail'] = TRUE;</p>
<p>		foreach (array_keys($branch['below']) as $key) {<br />
			__example_menu_tree_set_active_trail($branch['below'][$key], $mlids);<br />
		}<br />
	}<br />
}<br />
</code></p>
<p>I think this function should be added to core.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Full Menu Tree with Active Trail in Drupal 6 by Jeff Maes</title>
		<link>http://www.touchdesk.nl/2009/04/full-menu-tree-with-active-trail-in-drupal-6/comment-page-1/#comment-112</link>
		<dc:creator>Jeff Maes</dc:creator>
		<pubDate>Mon, 09 Jan 2012 11:09:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.touchdesk.nl/?p=54#comment-112</guid>
		<description>Hi all,
I've made a similar function that you can use in &lt;strong&gt;D7&lt;/strong&gt;.

&lt;code&gt;
function menu_tree_all_data_with_active_trail($menu_name) {
  
  function menu_tree_active_trail(&amp;$tree_data, $menu_item) {
    foreach($tree_data as &amp;$item) {
      if(!empty($item['link']) &amp;&amp; $item['link']['href'] == $menu_item['href']) {
        $item['link']['in_active_trail'] = TRUE;
        return TRUE;
      } elseif(!empty($item['below'])) {
        if(menu_tree_active_trail($item['below'], $menu_item)) {
          $item['link']['in_active_trail'] = TRUE;
          return TRUE;
        }
      }
    }
    return FALSE;
  }
  
  $menu_item = menu_get_item();
  $menu_tree = menu_tree_all_data($menu_name);
  
  menu_tree_active_trail($menu_tree, $menu_item);
  
  return $menu_tree;
}
&lt;/code&gt;

Usage is the same as in menu_tree_all_data()
&lt;code&gt;
$tree = menu_tree_all_data_with_active_trail('menu-product-categories');
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Hi all,<br />
I&#8217;ve made a similar function that you can use in <strong>D7</strong>.</p>
<p><code><br />
function menu_tree_all_data_with_active_trail($menu_name) {</p>
<p>  function menu_tree_active_trail(&amp;$tree_data, $menu_item) {<br />
    foreach($tree_data as &amp;$item) {<br />
      if(!empty($item['link']) &amp;&amp; $item['link']['href'] == $menu_item['href']) {<br />
        $item['link']['in_active_trail'] = TRUE;<br />
        return TRUE;<br />
      } elseif(!empty($item['below'])) {<br />
        if(menu_tree_active_trail($item['below'], $menu_item)) {<br />
          $item['link']['in_active_trail'] = TRUE;<br />
          return TRUE;<br />
        }<br />
      }<br />
    }<br />
    return FALSE;<br />
  }</p>
<p>  $menu_item = menu_get_item();<br />
  $menu_tree = menu_tree_all_data($menu_name);</p>
<p>  menu_tree_active_trail($menu_tree, $menu_item);</p>
<p>  return $menu_tree;<br />
}<br />
</code></p>
<p>Usage is the same as in menu_tree_all_data()<br />
<code><br />
$tree = menu_tree_all_data_with_active_trail('menu-product-categories');<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Full Menu Tree with Active Trail in Drupal 6 by Stephen Wilson</title>
		<link>http://www.touchdesk.nl/2009/04/full-menu-tree-with-active-trail-in-drupal-6/comment-page-1/#comment-111</link>
		<dc:creator>Stephen Wilson</dc:creator>
		<pubDate>Mon, 26 Sep 2011 19:37:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.touchdesk.nl/?p=54#comment-111</guid>
		<description>Struggling to get the above code ported over to D7 (I'm not much of a programmer!)

I think menu _tree_full has been replaced/dropped but I'm not sure what with?

Any help would be greatly appreciated.

S</description>
		<content:encoded><![CDATA[<p>Struggling to get the above code ported over to D7 (I&#8217;m not much of a programmer!)</p>
<p>I think menu _tree_full has been replaced/dropped but I&#8217;m not sure what with?</p>
<p>Any help would be greatly appreciated.</p>
<p>S</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Full Menu Tree with Active Trail in Drupal 6 by Dynamind</title>
		<link>http://www.touchdesk.nl/2009/04/full-menu-tree-with-active-trail-in-drupal-6/comment-page-1/#comment-109</link>
		<dc:creator>Dynamind</dc:creator>
		<pubDate>Thu, 09 Jun 2011 09:11:49 +0000</pubDate>
		<guid isPermaLink="false">http://www.touchdesk.nl/?p=54#comment-109</guid>
		<description>Probably, yes. The core menu API doesn't seem to have changed (or at least not by much) from Drupal 6 to Drupal 7. I'd say give it a shot and shout if you need help.</description>
		<content:encoded><![CDATA[<p>Probably, yes. The core menu API doesn&#8217;t seem to have changed (or at least not by much) from Drupal 6 to Drupal 7. I&#8217;d say give it a shot and shout if you need help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Full Menu Tree with Active Trail in Drupal 6 by Stephen Wilson</title>
		<link>http://www.touchdesk.nl/2009/04/full-menu-tree-with-active-trail-in-drupal-6/comment-page-1/#comment-108</link>
		<dc:creator>Stephen Wilson</dc:creator>
		<pubDate>Thu, 09 Jun 2011 08:58:20 +0000</pubDate>
		<guid isPermaLink="false">http://www.touchdesk.nl/?p=54#comment-108</guid>
		<description>Could this code be modified to work in D7?</description>
		<content:encoded><![CDATA[<p>Could this code be modified to work in D7?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Full Menu Tree with Active Trail in Drupal 6 by Vicegd</title>
		<link>http://www.touchdesk.nl/2009/04/full-menu-tree-with-active-trail-in-drupal-6/comment-page-1/#comment-106</link>
		<dc:creator>Vicegd</dc:creator>
		<pubDate>Sat, 26 Mar 2011 13:33:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.touchdesk.nl/?p=54#comment-106</guid>
		<description>Thanks a lot. It was very useful.</description>
		<content:encoded><![CDATA[<p>Thanks a lot. It was very useful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Full Menu Tree with Active Trail in Drupal 6 by roman</title>
		<link>http://www.touchdesk.nl/2009/04/full-menu-tree-with-active-trail-in-drupal-6/comment-page-1/#comment-104</link>
		<dc:creator>roman</dc:creator>
		<pubDate>Fri, 04 Feb 2011 17:17:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.touchdesk.nl/?p=54#comment-104</guid>
		<description>"Thank you. You should poke and prod the drupal devs until this is the standard way of working."

Agreed. Every word. :-)</description>
		<content:encoded><![CDATA[<p>&#8220;Thank you. You should poke and prod the drupal devs until this is the standard way of working.&#8221;</p>
<p>Agreed. Every word. <img src='http://www.touchdesk.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Full Menu Tree with Active Trail in Drupal 6 by Alex</title>
		<link>http://www.touchdesk.nl/2009/04/full-menu-tree-with-active-trail-in-drupal-6/comment-page-1/#comment-98</link>
		<dc:creator>Alex</dc:creator>
		<pubDate>Thu, 19 Aug 2010 09:23:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.touchdesk.nl/?p=54#comment-98</guid>
		<description>Thank you. However it seems there is a problem with this algo if 2 items link to the same content in the same branch</description>
		<content:encoded><![CDATA[<p>Thank you. However it seems there is a problem with this algo if 2 items link to the same content in the same branch</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Making MenuTrails Work with Views 2 in Drupal 6.x by jgreep</title>
		<link>http://www.touchdesk.nl/2009/04/making-menutrails-work-with-views-2-in-drupal-6/comment-page-1/#comment-97</link>
		<dc:creator>jgreep</dc:creator>
		<pubDate>Tue, 27 Apr 2010 17:46:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.touchdesk.nl/?p=40#comment-97</guid>
		<description>There are a lot of equality checks in the menutrails module for link_path vs. the item href.  They don't take into account that the href is fully expanded and the link path still contains a wildcard.  You can see an example of this in the menutrails_get_breadcrumbs function.</description>
		<content:encoded><![CDATA[<p>There are a lot of equality checks in the menutrails module for link_path vs. the item href.  They don&#8217;t take into account that the href is fully expanded and the link path still contains a wildcard.  You can see an example of this in the menutrails_get_breadcrumbs function.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

