<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><DIV></DIV>
<DIV>I&nbsp;haven't looked&nbsp;at that code in D7 yet, but based on D6, I am going to guess that it hasn't changed. The URL alias is resolved to the underlying "node/1234" before the menu is looked at. Since the menu specifies "article/hello," it does NOT match "node/1234" and therefore executes the standard "node/%nid" path instead. If you change the menu path to "node/1234," I bet it will do what you want.<BR>&nbsp;</DIV>
<P><FONT color=#ff007f size=4 face="bookman old style, new york, times, serif"><EM><STRONG>Nancy</STRONG></EM></FONT></P>
<P>&nbsp;</P>
<P><FONT face="arial, helvetica, sans-serif">Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.</FONT></P>
<DIV><BR></DIV>
<DIV style="FONT-FAMILY: arial, helvetica, sans-serif; FONT-SIZE: 12pt"><BR>
<DIV style="FONT-FAMILY: times new roman, new york, times, serif; FONT-SIZE: 12pt"><FONT size=2 face=Tahoma>
<HR SIZE=1>
<B><SPAN style="FONT-WEIGHT: bold">From:</SPAN></B> Deva &lt;devendra.in@gmail.com&gt;<BR><B><SPAN style="FONT-WEIGHT: bold">To:</SPAN></B> development@drupal.org<BR><B><SPAN style="FONT-WEIGHT: bold">Sent:</SPAN></B> Thu, February 17, 2011 8:41:21 AM<BR><B><SPAN style="FONT-WEIGHT: bold">Subject:</SPAN></B> [development] hook_menu vs path alias Drupal 7<BR></FONT><BR><FONT face=verdana,sans-serif>Hi All,<BR><BR>I am developing a site in Drupal 7. I have a node with alias /article/hello<BR>I also have a hook_menu with "</FONT><FONT face=verdana,sans-serif>/article/hello</FONT><FONT face=verdana,sans-serif>" path registered in my module.<BR>When i access the path in browser http://localhost/article/hello it shows the node instead of calling "</FONT><FONT face=verdana,sans-serif>my_custom_function</FONT><FONT face=verdana,sans-serif>".<BR><BR>$items['</FONT><FONT face=verdana,sans-serif>article/hello</FONT><FONT face=verdana,sans-serif>'] =
 array(<BR>&nbsp;&nbsp;&nbsp; 'title' =&gt; 'Hello World', <BR>&nbsp;&nbsp;&nbsp; 'description' =&gt; 'Hello world', <BR>&nbsp;&nbsp;&nbsp; 'page callback' =&gt; 'my_custom_function', <BR>&nbsp;&nbsp;&nbsp; 'access arguments' =&gt; array('access content'), <BR>&nbsp;&nbsp;&nbsp; 'type' =&gt; MENU_CALLBACK,<BR>);<BR><BR>I want 'my_custom_function' to get called.</FONT><BR><FONT face=verdana,sans-serif>Appreciate your help.</FONT><BR><BR>-- <BR>:DJ<BR><BR><BR></DIV></DIV></div></body></html>