Add documentation for link templates

Created on 17 December 2021, almost 3 years ago
Updated 28 January 2024, 10 months ago

Documentation location/URL

https://www.drupal.org/docs/drupal-apis/entity-api/link-templates

Problem/Motivation

Add a new child page of the Entity API guide (not to be confused with the API page for the Entity API).

Link templates (the array keyed by @links in an entity annotation) need more documentation.

Adding one of the standard link templates (canonical, edit-form, delete-form, or collection) is not hard. Adding a custom link template is more complicated, and the process is affected by a few different subsystems and module.

Proposed resolution

Add a new page at https://www.drupal.org/docs/drupal-apis/entity-api/link-templates .

Feature request
Status

Needs work

Component

Missing documentation

Created by

🇺🇸United States benjifisher Boston area

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹
  • 🇺🇸United States benjifisher Boston area

    @apaderno:

    Thanks for updating the issue description.

    I wrote the documentation page, and @Berdir added it to the menu (see Comment #9). I think this issue is complete, but I want to follow the usual procedure of setting the status to NR (Comment #6) and letting others update the status to RTBC, then Fixed.

  • 🇮🇹Italy apaderno Brescia, 🇮🇹

    @benjifisher I apologize for bumping this issue.
    I was going through all these issues to understand which ones were already fixed and which ones I could fix. I moved the link for the "involved" page at the beginning to make it easier for other users to understand which page was "involved."

    To me, the information given on that page seems complete.

  • 🇺🇸United States briangoldstein

    Hi Everyone!

    I just read through the page ( https://www.drupal.org/docs/drupal-apis/entity-api/link-templates ) for review. I can confirm it's been added to the menu and that the information is adequate in detail. It also seems to conform to the API docs commenting and standards described here: https://www.drupal.org/docs/develop/standards/php/api-documentation-and-comment-standards

    This is actually my first comment on any issue, so I am not certain if that means I can update the status to RTBC, but echoing the other commenters above, everything seems to be in order on this one!

  • Status changed to Needs work 10 months ago
  • 🇺🇸United States mile23 Seattle, WA

    Setting to NW because even though the link templates docs are good (thanks!), they stop just short of telling me the spec for *.link_relation_types.yml files, or giving the context for how to figure out where to look. The two linked ones have URIs that are 404s, and then a description, so I suppose I can get away with just about anything, as long as the top-level key is defined, but it would be nice to know.

    The other thing is this one: #2848945: EntityType link templates: using link relation type names as keys is a problem which hints that maybe we should be careful how we define these, in line with an IANA standard, and it seems like referencing that standard in a relevant way on the docs page would be a good clue.

    I'd update it, but I have yet to learn what to say. :-)

Production build 0.71.5 2024