You want to link to a page you have created.

Once you have created and published a web page, you will want to give users access to it. As with web pages everywhere, this is done primarily by creating links to the new document in the form of hyper-links. A hyper-link can either be embedded in the content of another page, or appear as an entry in a menu.

In Drupal, the web-address for an individual entry takes the form "/node/{node-number}," where {node-number} is the unique numerical identifier. The first page you created for your site would have the address "/node/1;" the second "/node/2" and so on. You will see this address in the address bar of your web browser when viewing the page in question. For instance, the address for this recipe is http://www.coalface.net/node/8. If you are linking to a local page (i.e., to a page within the current web site), you only need the part of the web address after the web site name. For this page it would be /node/8."

There are several ways to add an embedded link to a page. The first is simply to include the full web address in the text of the page: http://www.coalface.net/node/8. This only works if Drupal recognizes text as a hyper link, which it determines by whether it starts with http:// or not. So if you want to link to a local page in this way, you will have to enter the entire web address, and not merely the last part. Another way to link is to add an anchor to the page in the form <a href="{web-address}">{link text}<a>. For instance to create the link here's a link to this page, I entered <a href="/node/8">here's a link to this page</a> into the text of this site.

To link to a page via a menu entry can be done in one of two ways. Below the "Body" field on the "Create content" page you will find a link titled "Menu settings." Clicking it presents extended form fields. In the "Title" field, enter the menu entry's text, i.e., the text the user will see in the menu entry. The "Description" field is text that the user will see when hovering his mouse over the link; it generally gives a more detailed description of the page linked to. The "Parent item" selection tells Drupal where to place the new link. If you select "Navigation," it will appear in the main navigation menu to the left. If you choose "Primary links," it appears in the menu bar at the top of this page. Once you have made your choices and clicked "Submit," a menu entry will appear immediately in the menu of your choice, linking to the new page.

The second way to create a menu entry to a page is to manually create a menu entry from the "Menus" administration page. To get there, from the main Navigation menu click Administer > Site building > Menus. This displays all of your site's menus hierarchically and gives you the opportunity to add or delete menu entries. To add a new entry click the "Add menu item" tab at the top of the page. You will see fields similar to those under the "Menu settings" section described above, but with another field titled "Path." This is where you enter the address of the web page you are linking to. So to link to this page you would enter /node/8. Select the menu under which this entry should appear and click "Submit" to create and immediately display the new entry.

Comments

Post new comment

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options

Back to top