Hi All

How can I give an external link in menu of drupal?

I have created a menu and some submenus

In one of my submenu I want to put my blogging sites URL

I am not able to link external link from menu

Can anyone tell me how can I solve this ?

Comments

As of this morning, Drupal now supports external URLs in menu.
--
Read my developer blog on Drupal4hu. | The news is Now Public

--
Drupal development: making the world better, one patch at a time. | A bedroom without a teddy is like a face without a smile.

You can't... at least not until this morning with the latest CVS/HEAD copy of the code. This change enables it (code).

To use this code you'll need to get the latest version of CVS drupal, either by CVS or waiting until tomorrow and getting the gzip.

What a coincedence !

Great timing, Thanks

Manish Nakar
ITVidya : India's First Technology Blogging Network
EbizLive : Business Winning Websites

No longer working (for me) after updating 4.6.5 -> 4.6.6

This part of the patch causes the problem:

diff -uNr drupal-4.6.5/includes/menu.inc drupal-4.6.6/includes/menu.inc
--- drupal-4.6.5/includes/menu.inc 2005-11-28 16:45:19.000000000 +0100
+++ drupal-4.6.6/includes/menu.inc 2006-03-13 23:14:49.000000000 +0100
@@ -803,7 +803,7 @@
         else {
           // It has a permanent ID. Only replace with non-custom menu items.
           if ($item->type & MENU_CREATED_BY_ADMIN) {
-            $_menu['items'][$item->mid] = array('path' => $item->path, 'access' => TRUE, 'callback' => '');
+            $_menu['items'][$item->mid] = array('path' => $item->path, 'callback' => '');
           }
           else {
             // Leave the old item around as a shortcut to this one.
@@ -815,7 +815,7 @@
       else {
         // The path was not declared, so this is a custom item or an orphaned one.
         if ($item->type & MENU_CREATED_BY_ADMIN) {
-          $_menu['items'][$item->mid] = array('path' => $item->path, 'access' => TRUE, 'callback' => '');
+          $_menu['items'][$item->mid] = array('path' => $item->path, 'callback' => '');
           if (!empty($item->path)) {
             $_menu['path index'][$item->path] = $item->mid;
           }

After undoing it (i.e. adding 'access' => TRUE again), everything was back to normal.

This holds true for me as well, in all aspects. I had costum menu blocks with external links, which resulted in empty blocks after updating. Adding 'access' => TRUE again fixes this - but I guess resulting in the security flaw againg, which was supposed to be fixed with this patch.

Any possibilities to fix the security bug while providing menu block functionality like before?

Kind regards,
Frisco

Personal Weblog and more: http://bischof.homelinux.net/cms/drupal/

Personal Weblog and more: http://bischof.homelinux.net/cms/drupal/

I just added a menu entry pointing to admin/logs; the menu item appears if I am logged in as admin. When logged out, the menu entry disappears. The same effect for unprivileged users... did I miss something? Can you check that on your installation? My setup: Drupal 4.6.6 with the patch mentioned above undone.

I'm having the same problem, specifically trying to have a menu item link to the front page, the menu item disappears now under 4.6.6, even with the <front> token.

I'm using the front_page module, so I could just point to that, but I'd rather not see the word front_page tacked on to the end of my url.

Patrick

--
www.BRINQ.com - good, green strategy

Looks like there's a fix in the CVS, at least for the external links, I haven't figured out how to use the <front> token correctly, but that may just be my own issue. I can link to the frontpage via an external link now.

Check out

http://cvs.drupal.org/viewcvs/drupal/drupal/includes/menu.inc?r1=1.79.2....

--
www.BRINQ.com - good, green strategy

I had the same problem. Adding back in the 'access' => TRUE worked on my sites.

It was happening on my 3 sites with either a link to an external or an internal URL. All were upgraded from 4.6.5 to 4.6.6 then I couldn't add anything to the menu!

All seems well now.