The path generated will be like <span style="font-family:sans-serif;font-size:13px;background-color:rgb(255,204,153)">productmenu/products/Color+MFP. </span><div><font face="sans-serif"><br></font></div><div><font face="sans-serif">It turns out &quot;+&quot; does not work in Drupal menu router function.</font></div>
<div><font face="sans-serif"><br></font></div><div><font face="sans-serif">Change urlencode() and make links look like </font><span style="font-family:sans-serif;font-size:13px;background-color:rgb(255,204,153)">productmenu/products/Color_MFP will fix the issue</span><font face="sans-serif"><br>
</font><br>Cheers, Eric<br><br><div class="gmail_quote">On Fri, Oct 26, 2012 at 3:17 PM, Ken Robinson <span dir="ltr">&lt;<a href="mailto:kenrbnsn@rbnsn.com" target="_blank">kenrbnsn@rbnsn.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thanks. I tried that and it didn&#39;t work for me. :-(<br>
<br>
I thought that maybe the superfish module that I&#39;m using to display<br>
the menu was interfering, but turning it off didn&#39;t help. Any other<br>
suggestions?<br>
<span class="HOEnZb"><font color="#888888"><br>
Ken<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
At 05:54 PM 10/25/2012, Metzler, David wrote:<br>
&gt;Problem is the titles in the child elements.   Try this:<br>
&gt;<br>
&gt;         $items[&quot;productmenu/products/&quot; .urlencode($cat)] = array(<br>
&gt;                                         &#39;title&#39; =&gt; $cat,<br>
&gt;                                         &#39;page callback&#39; =&gt;<br>
&gt; &#39;_productmenu_menu_page&#39;,<br>
&gt;                                         &#39;page arguments&#39; =&gt;<br>
&gt; array(url(&quot;$base_url/productscategory/$id&quot;)),<br>
&gt;                                         &#39;access callback&#39; =&gt; TRUE,<br>
&gt;                                         &#39;expanded&#39; =&gt; TRUE,<br>
&gt;                                 );<br>
&gt;That worked for me.<br>
&gt;<br>
&gt;-----Original Message-----<br>
&gt;From: <a href="mailto:support-bounces@drupal.org">support-bounces@drupal.org</a> [mailto:<a href="mailto:support-bounces@drupal.org">support-bounces@drupal.org</a>]<br>
&gt;On Behalf Of Ken Robinson<br>
&gt;Sent: Thursday, October 25, 2012 2:00 PM<br>
&gt;To: <a href="mailto:support@drupal.org">support@drupal.org</a><br>
&gt;Subject: Re: [support] Problem getting a custom menu to display (D7)<br>
&gt;<br>
&gt;Thanks. According to the comments in the menu example I&#39;m following, if you<br>
&gt;don&#39;t have a &#39;type&#39;, it defaults to MENU_NORMAL_ITEM. If I type the<br>
&gt;generated<br>
&gt;URL directly, I get the expected results -- it goes to the correct place,<br>
&gt;not a 404.<br>
&gt;<br>
&gt;Ken<br>
&gt;<br>
&gt; &gt; -----Original Message-----<br>
&gt; &gt; From: <a href="mailto:support-bounces@drupal.org">support-bounces@drupal.org</a> [mailto:<a href="mailto:support-bounces@drupal.org">support-bounces@drupal.org</a>] On<br>
&gt; &gt; Behalf Of Metzler, David<br>
&gt; &gt; Sent: Thursday, October 25, 2012 4:52 PM<br>
&gt; &gt; To: &#39;<a href="mailto:support@drupal.org">support@drupal.org</a>&#39;<br>
&gt; &gt; Subject: Re: [support] Problem getting a custom menu to display (D7)<br>
&gt; &gt;<br>
&gt; &gt; Looks like you&#39;re missing the &#39;type&#39; on your second items array (the<br>
&gt; &gt; one in  your foreach loop. You also might consider properly url<br>
&gt; &gt; econding the menu rather than using the str_replace() function.<br>
&gt; &gt;<br>
&gt; &gt; Also can you verify what happens if you visit the URL directly?  Do you<br>
&gt; &gt; get the page or a page not found?<br>
&gt; &gt;<br>
&gt; &gt; Dave<br>
&gt; &gt;<br>
&gt; &gt; -----Original Message-----<br>
&gt; &gt; From: <a href="mailto:support-bounces@drupal.org">support-bounces@drupal.org</a> [mailto:<a href="mailto:support-bounces@drupal.org">support-bounces@drupal.org</a>] On<br>
&gt; &gt; Behalf Of Ken Robinson<br>
&gt; &gt; Sent: Thursday, October 25, 2012 1:29 PM<br>
&gt; &gt; To: <a href="mailto:support@drupal.org">support@drupal.org</a><br>
&gt; &gt; Subject: [support] Problem getting a custom menu to display (D7)<br>
&gt; &gt;<br>
&gt; &gt; I have written a menu using a custom module. I can&#39;t get it to<br>
&gt; &gt; display on my test site. I used the menu example in the examples<br>
&gt; &gt; module as a guideline.<br>
&gt; &gt;<br>
&gt; &gt; My code can be seen at <a href="http://pastebin.com/VJiC5anM" target="_blank">http://pastebin.com/VJiC5anM</a><br>
&gt; &gt;<br>
&gt; &gt; I&#39;ve enabled the module and I know it&#39;s being executed, since I see<br>
&gt; &gt; the output of the dpm($items) call. I clear the cache every time I<br>
&gt; &gt; make a change to the code. Any help would be appreciated.<br>
&gt; &gt;<br>
&gt; &gt; Thanks in advance.<br>
&gt; &gt;<br>
&gt; &gt; Ken<br>
&gt; &gt;<br>
&gt; &gt; --<br>
&gt; &gt; [ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
&gt; &gt; --<br>
&gt; &gt; [ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
&gt;<br>
&gt;--<br>
&gt;[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
&gt;--<br>
&gt;[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
<br>
--<br>
[ Drupal support list | <a href="http://lists.drupal.org/" target="_blank">http://lists.drupal.org/</a> ]<br>
</div></div></blockquote></div><br></div>