I'm trying to edit the paths of primary menu items. I want one of the links to go to http://localhost/drupal/?q=labs-list. This page exists and I can get there by typing it in the url bar. I want a menu item that links to this path. In the path field, I've tried entering the following:
1. labs-list. When I click on the link it takes me to http://localhost/drupal/labs-list, which doesn't exist.
2. ?q=labs-list. This gives me an error on the edit menu item page saying 'The path " is either invalid or you do not have access to it'
3. http://localhost/drupal/?q=labs-list. When I click on the link it takes me to http://localhost/drupal/http://localhost/drupal/?q=labs-list. So basically it just appends the entire path.
Can anyone give me any suggestions? I've got the same problem with wildcards and dynamic paths too ie in user/%/manage_accounts.
Comments
activate Clean URLs to
activate Clean URLs to dissapearing "?q=" code.
ꦱꦠꦽꦶꦪ
Why would only the primary
Why would only the primary links look for clean URL's whereas the navigation links work fine with ?q=
I guess the senario is that
I guess the senario is that you are making the menu link through the interface, and adding this in the link
http://localhost/drupal/?q=labs-list?
Edit your menu item and just add labs-list
The menu will take care of the base_url and the ?q= depending on clean url being enabled or not.
Adding in just labs-list
Adding in just labs-list didn't work. That was number 1. in my comment. It takes me to http://localhost/drupal/labs-list
Are you using a node for this
Are you using a node for this path? Then add the node/nid to the menu or add the menu item through the edit form, it should work. Please provide more details about your menu item and what is it being linked to.
labs-list a view of type
labs-list a view of type node. The path for the page is http://localhost/drupal/?q=labs-list. But this problem persists even if I have a random node/nid in the path for the menu item.
last piece of
last piece of advice
menu_rebuild();
Okay I'll try that. Could you
Okay I'll try that. Could you tell me where I can call that from? I'm not too familiar with the back-end code.
Thanks for your help. I got
Thanks for your help. I got it to work by enabling clean url's.