Problem/Motivation

I was just in a convo thread with someone who had gotten pretty frustrated trying to write a render array for the first time. They pointed at the the Render API overview at https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!theme.api.... doesn't link to list of elements at https://api.drupal.org/api/drupal/elements/9.3.x, which is a good observation.

Proposed resolution

Update the Render elements section of theme.api.php to include such a link.

CommentFileSizeAuthor
#15 3236269-nr-bot.txt690 bytesneeds-review-queue-bot

Issue fork drupal-3236269

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mandclu created an issue. See original summary.

heni_deepak’s picture

@mandclu Recently, I worked with some features related to custom forms. According to the API reference, I need to share this link (https://api.drupal.org/api/drupal/elements/9.3.x) separately with my team to explain the API process of the respective area.

It would be perfect here to add the link in the right place.

mandclu’s picture

Status: Active » Needs review
quietone’s picture

Category: Feature request » Task
Status: Needs review » Needs work

@mandclu, thanks for the patch to improve the docs.

I reckon this is a task not a feature request. And shouldn't this use @link instead of the URL?

mandclu’s picture

Status: Needs work » Needs review

Thanks for the feedback. I've added a commit to the MR with your suggestion.

eojthebrave’s picture

Status: Needs review » Needs work

I think we can improve this by using the 'listing_page_element' @defgroup as the link target here instead of the full URL. So something like @link listing_page_element Elements link @endlink. This would allow the link to work on any site displaying the API docs not just api.drupal.org.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

itmaybejj’s picture

Priority: Normal » Major

(never mind; that was fixed and not as related as I thought)

itmaybejj’s picture

Priority: Major » Normal
quietone’s picture

Status: Needs work » Needs review

Updated the MR.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new690 bytes

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

quietone’s picture

Status: Needs work » Needs review
Issue tags: +no-needs-review-bot

No, it passes all tests.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +Needs Review Queue Initiative

Change seems straight forward enough.

  • nod_ committed 986ae33d on 10.3.x
    Issue #3236269 by mandclu, quietone, heni_deepak, eojthebrave: Render...

  • nod_ committed 49f6e5ee on 10.4.x
    Issue #3236269 by mandclu, quietone, heni_deepak, eojthebrave: Render...

  • nod_ committed d3d8ab00 on 11.0.x
    Issue #3236269 by mandclu, quietone, heni_deepak, eojthebrave: Render...

  • nod_ committed d241b6cb on 11.x
    Issue #3236269 by mandclu, quietone, heni_deepak, eojthebrave: Render...
nod_’s picture

Version: 11.x-dev » 10.3.x-dev
Status: Reviewed & tested by the community » Fixed

Committed and pushed d241b6cb53 to 11.x and d3d8ab00bf to 11.0.x and 49f6e5eeff to 10.4.x and 986ae33d4b to 10.3.x. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.