Hi,
I'm using both primary and secondary links in a 5.2 site I've been developing. I also use an extra menu which is displayed on the left sidebar. One of this menu's options links to the integrated Drupal forum (forum path), which works fine. I also have the same link in another menu item from the secondary links (forum path). However, the latter is not rendered correctly. If I am at the admin pages, the menu item at the secondary links is rendered based on the current url and not on the site's root, so it could be rendered as admin/forum or node/add/forum, etc. The menu item in the left sidebar is always rendered without problem.
Why is this happening? Is this a bug or something else I'm missing?
Thanks,
Vasileios Lourdas wrote:
Hi,
I'm using both primary and secondary links in a 5.2 site I've been developing. I also use an extra menu which is displayed on the left sidebar. One of this menu's options links to the integrated Drupal forum (forum path), which works fine. I also have the same link in another menu item from the secondary links (forum path). However, the latter is not rendered correctly. If I am at the admin pages, the menu item at the secondary links is rendered based on the current url and not on the site's root, so it could be rendered as admin/forum or node/add/forum, etc. The menu item in the left sidebar is always rendered without problem.
Why is this happening? Is this a bug or something else I'm missing?
Thanks,
If your forum path is something like http://example.com/forum, in your menu item set /forum as the path.
On Thursday 27 September 2007 10:13:29 Sudheer Satyanarayana wrote:
If your forum path is something like http://example.com/forum, in your menu item set /forum as the path.
-- With Warm Regards, Sudheer. S http://www.binaryvibes.co.in
No, it's not. Links are supposed to be relative based on where Drupal is installed (in web root or under a directory in that) and we shouldn't use absolute ones.
I think its best to always use the l() funciton, http://api.drupal.org/api/function/l/5
One huge benefit to using l() is that aliases are automatically used for links that have them.
Vasileios Lourdas wrote:
Hi,
I'm using both primary and secondary links in a 5.2 site I've been developing. I also use an extra menu which is displayed on the left sidebar. One of this menu's options links to the integrated Drupal forum (forum path), which works fine. I also have the same link in another menu item from the secondary links (forum path). However, the latter is not rendered correctly. If I am at the admin pages, the menu item at the secondary links is rendered based on the current url and not on the site's root, so it could be rendered as admin/forum or node/add/forum, etc. The menu item in the left sidebar is always rendered without problem.
Why is this happening? Is this a bug or something else I'm missing?
Thanks,
On Thursday 27 September 2007 18:14:26 Eric Mckenna wrote:
I think its best to always use the l() funciton, http://api.drupal.org/api/function/l/5
One huge benefit to using l() is that aliases are automatically used for links that have them.
And how do I use the l() function in a menu item?
Vasileios Lourdas wrote:
On Thursday 27 September 2007 18:14:26 Eric Mckenna wrote:
I think its best to always use the l() funciton, http://api.drupal.org/api/function/l/5
One huge benefit to using l() is that aliases are automatically used for links that have them.
And how do I use the l() function in a menu item?
I misunderstood your problem. I thought you were talking about theming your own menu items/links. You can't use the l() function in the admin/build/menu section.
Have you tried using unique menu titles? Can you list the titles and urls entered in the admin section for those menus.