AGNR Groups

Web Groups for the College of Agriculture &
Natural Resources and Affiliates

Cannot link to a page

What if the page I want to link to isn't found by Linkit?

If you are using the search feature to find pages to link to, occasionally Drupal will not display the one you want. This commonly occurs when you want to link to an unsupported content type. The Linkit search feature only works on certain types of content, including Pages, but does not work on others, like Events.

1. Paste the URL into the search field

If Linkit's search doesn't find the right page, you can open the page yourself (in a new browser tab!), copy its URL, and paste it into the "Search Content" field. Drupal will recognize it as belonging to the site, and show the page title in a green dropdown. Click the dropdown and the path field will be filled with the correct internal path.*

A URL pasted into the Search Content Field, a green dropdown with the page name.

2. Directly link to the URL

As a last resort, type the URL of the page into the Target path field, but be sure that the URL is root-relative. Root-relative means that the site name and protocol are left out, and the link begins with a slash.

So would be entered as /agnr-drupal-manual/creating-links

This ensures that the user will stay on the same version of the site. If you click a root-relative link, it will take you to that page, but use the same protocol that you are already using (so when you are logged in, you will stay on the https version of the site and retain your editing capabilities, but if you are logged out, you will stay on the http version)

Best practices

*It is important to use Drupal internal paths as the URL (e.g. /node/#) whenever possible, because that way the link stays functional even if the page title changes.

* For links to other pages within your site, avoid using http:// or https:// and just begin the url with the first slash after the site name.