Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By anjeet on
hello everybody,
I am new to drupal and want to link pages by giving link on primary link menu pages if u have any idea please help me
Comments
Not quite sure what the
Not quite sure what the question is.
If you have not entered any primary links, then that area in your template that should hold them will have an 'edit primary links' link. Just follow that link to start adding menu items.
If you mean that you want the primary links to change, depending on which page you are looking at, I am not sure you can really do that in a simple setup.
I know you can change the menus by having a different table prefixes used, but you will have to set up other subdomains or folder in a multisite setup.
The question's also not clear to me
1. On primary links:
Navigate to: Home > Administer > menus
This contains all the menus, at the bottom you'll probably find 'Primary Links'. Click 'add item'. Insert 'HELP' at title, 'go to Help page' at description and at path: a path in Drupal-speak is part of a URL, insert 'admin/help'. Leave 'expanded' unchecked, leave 'Parent item' on 'Primary links' and leave 'weight' on 0. Clicking 'Submit' should give you a menu item, located on the place of your primary links, directing you to the help page.
2. On using links in general:
Using a link in Drupal inside PHP goes so: Home > Administer > blocks, add block, insert 'myBlock' in 'Block description' and 'Block title' and use in the 'Block body' for example:
On 'Input format' switch on 'PHP code' and save block. Enable this block in the left or right hand column via the block menu and you'll have links. The command therefore is: l("visible name of link", "path"), once you print that on the screen you'll get a Drupal link.