Anyway I have another question.
I add menu item during saving content type. I want to have URI to this content type like this:
offers/parent-offer-name/sub-offer-name
I have 6 parent offers (just containers for sub-offers) and many sub offers references to parent by node reference.
After adding menu item I check this in site building->menus and choose last added menu item
I see this error similar to this: The path 'offers/parrent-offer/sub-offer1' is either invalid or you do not have access to it.
How can I config pathauto to allowed those kind of uri's??
Code that I use to add menu link during saving content:
$r = db_query("SELECT mlid FROM {menu_links} WHERE link_title='%s'", $referenced_node->title);
$res = db_fetch_array($r);
$item = array(
'menu_name' => 'menu-offers',
'link_path' => $referenced_node->path . '/' .pathauto_cleanstring($node->title),
'link_title' => $node->title,
'plid' => $res['mlid'],
'hidden' => 0
);