<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><BR><DIV><DIV>On 17 Jan 2007, at 7:53 PM, Dries Buytaert wrote:</DIV><BR class="Apple-interchange-newline"><BLOCKQUOTE type="cite"><P style="margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; min-height: 14.0px"><BR></P> <P style="margin: 0.0px 0.0px 0.0px 0.0px"><FONT face="Helvetica" size="3" style="font: 12.0px Helvetica">Adrian, what do you mean with 'target path'?<SPAN class="Apple-converted-space"> </SPAN>Care to clarify?</FONT></P> </BLOCKQUOTE></DIV><BR><DIV>Ok. there's 3 paths here.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>1. the route path .. the router array is indexed via this</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV> $items['node/%/%'] = array(</DIV><DIV> 'title' => t('View'),</DIV><DIV> 'page callback' => 'node_page_view',</DIV><DIV> 'page arguments' => array(1, 2),</DIV><DIV> 'access callback' => '_comment_view_access',</DIV><DIV> 'access arguments' => array(1, 2),</DIV><DIV> 'type' => MENU_CALLBACK,</DIV><DIV> );</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>2. the target path of the menu item. IE: the EXACT PAGE, the menu item is pointing to.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>An example of this would be node/123.. When linking to node/123 using the menu item, </DIV><DIV>you would need to resolve the target path from node/123 to the route path 'node/%/%', to be able</DIV><DIV>to find out what the access permissions are. If this were the link hook, i would be referring to</DIV><DIV>the 'href' element. (unless you pass the $routes to the menu hook and make it an explicit argument)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>3. the menu path. ie: where in the menu this item is located. </DIV><DIV>I think this is how i feel the menu data structure needs to be indexed, to be able to say where things are.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Either that or we don't index the menu items at all , making them incredibly difficult to manipulate. (ie: no menu_alter</DIV><DIV>hook where you could modify individual links). </DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Also, keep in mind, that in all likelihood, we will need to have the menu item only inherit from the route. It should probably</DIV><DIV>also be possible to override the access check for specific instances of that link.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV></BODY></HTML>