The description for the 'Path' field on the menu item form currently reads: "The Drupal path this menu item links to." Aside from being grammatically incorrect, it does not seem to be accurate. In my testing, the code properly handles full URLs (i.e. to external sites). The attached patch changes the field title to 'URL' and the description to "The URL for this link. It may be a Drupal path to a page on this site or a complete URL for a page on another site."

CommentFileSizeAuthor
#1 menu_path_desc2.patch1.39 KBjhriggs
menu_path_desc.patch1.26 KBjhriggs

Comments

jhriggs’s picture

StatusFileSize
new1.39 KB

New patch. Missed a title update.

Steven’s picture

Have you tried this with clean URLs off?

jhriggs’s picture

Good point. That may not work. I just went through something very similar with contextlinks.module. If it doesn't work, I'll change this to a feature request for handling external URLs and submit a patch.

dries’s picture

Using relative URLs is preferred for a number of reasons -- it is easier to change domain name, you can share your menu-table, less data to send, etc. That said, I'm OK with this patch but I'd prefer the naming to be consistent. The node form uses 'Path alias' and I'm not sure what wording is used in the documentation. Can you look into that first?

jhriggs’s picture

Category: bug » feature

As Steven suggested, this does not work with clear URLs off, so I will change this to a feature request.

Dries: it is not that I am or want to use full URLs for pages on the Drupal site. For that, I _would_ use Drupal paths. I want to be able to make menu items that are links to external sites or pages.

I am setting this to active and will create a patch that allows the use of external links for menu items.

jonbob’s picture

Title: Menu item path field description » Allow external links in custom menus
adrian’s picture