Drupal 7
In Drupal 7, the "Link path" field in the Menu UI was a straight-up text field, into which a user would enter a path. To link to a page like http://example.com/admin/content you would type in admin/content
. And to link to a page like http://example.com/node/4 you would enter node/4
, and so on.
However, this caused numerous problems: it required content authors to remember the URLs of content they created (which are auto-generated), rather than something about the content themselves, it also forced content authors to understand the concept of URLs, and specifically which part(s) of the URL to lop off and stick in the text box. It also always provided the behaviour of "following" a piece of content around despite path changes, even if that's not the behaviour you wanted. (e.g. "/about" that links to a node today, but a view tomorrow.)
Drupal 8
In Drupal 8, this field has now been turned into an autocomplete field, which will bring up node titles instead, for much better usability. Selecting a piece of content from the list will link behind-the-scenes to entity:node/4
, which retains the "keep the link working even if the node path changes" logic of Drupal 7.
(In the future, this may be expanded to include other types of entities and/or limited to specific bundles. See #2423093: Allow multiple target entity types in the 'entity_autocomplete' Form API element.)
However, as a result of this change, in order to link to an actual path such as "admin/content," you must now enter a leading slash: /admin/content
This will stop the autocomplete from triggering. (?
and #
also bypass autocomplete, for querystring and jump links, respectively.)
Attachment | Size |
---|---|
Screen Shot 2015-02-10 at 10.03.14 PM.png | 26.21 KB |