Problem/Motivation

The feed-icon.html.twig template uses a top-level variable called title. This is originally defined in core/includes/theme.inc:

'feed_icon' => [
   'variables' => ['url' => NULL, 'title' => NULL],
 ],

It isn't mentioned in the doc-block at the start of feed-icon.html.twig though.

Proposed resolution

Document the top-level title variable in the feed-icon.html.twig templates.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

Comments

andrewmacpherson created an issue. See original summary.

ramya balasubramanian’s picture

Hi @andrewmacpherson,

I have checked this feed-icon.html.twig files, totally this file is at 3 places

1. '/core/modules/system/templates/feed-icon.html.twig'
2. '/core/themes/stable9/templates/media-library/feed-icon.html.twig'
3. 'core/themes/stable/templates/misc/feed-icon.html.twig'

feed_icon' => [
'variables' => ['url' => NULL, 'title' => NULL],
]

I have seen the title was added under 'Available Variables'. Can you please let me know in which place this is not documented?

andrewmacpherson’s picture

It isn't documented in the twig files as a TOP-level variable.

The available variables in the twig docblock mention url and attributes as the top-level variables.

Note that the title variable is different from the attributes.title variable.

manisha111’s picture

Assigned: Unassigned » manisha111
manisha111’s picture

bandanasharma’s picture

Status: Active » Needs review
StatusFileSize
new1.88 KB

Add the missing top-level title documention for these files:
1. '/core/modules/system/templates/feed-icon.html.twig'
2. '/core/themes/stable9/templates/media-library/feed-icon.html.twig'
3. 'core/themes/stable/templates/misc/feed-icon.html.twig'

Please review the docmention and let me know your thoughts on this.

ranjith_kumar_k_u’s picture

StatusFileSize
new188.26 KB

I have applied the "feed-icon-doc-3156260-6.patch" patch on drupal 9.1 dev version,the patch applied successfully,now the title variable is documented in these 'feed-icon.html.twig' files
1. '/core/modules/system/templates/feed-icon.html.twig'
2. '/core/themes/stable9/templates/media-library/feed-icon.html.twig'
3. 'core/themes/stable/templates/misc/feed-icon.html.twig'
screenshot

ranjith_kumar_k_u’s picture

Status: Needs review » Reviewed & tested by the community
lauriii’s picture

Status: Reviewed & tested by the community » Needs review
+++ b/core/modules/system/templates/feed-icon.html.twig
@@ -5,6 +5,7 @@
+ * - title: Title use for the feed content label.

Maybe something like "Title of the feed for describing the feed on the subscribe link." would be more descriptive?

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

abhijith s’s picture

StatusFileSize
new1.96 KB

Added new description. Please check

tanubansal’s picture

Tested #6, #11, Updated changes are visible on 9.1

This can be moved to RTBC

abhijith s’s picture

Status: Needs review » Reviewed & tested by the community
lauriii’s picture

Status: Reviewed & tested by the community » Needs work

I think the text looks good now. While reviewing this, I noticed that Olivero has feed-icon.html.twig too so this change should be applied there too.

anmolgoyal74’s picture

Status: Needs work » Needs review
StatusFileSize
new2.61 KB
new530 bytes

Updated in Olivero theme as well.

paulocs’s picture

Status: Needs review » Reviewed & tested by the community

It looks good now.

  • lauriii committed a50813a on 9.1.x
    Issue #3156260 by anmolgoyal74, Abhijith S, bandanasharma,...
lauriii’s picture

Version: 9.2.x-dev » 9.1.x-dev
Status: Reviewed & tested by the community » Fixed

Committed 5deb8d7 and pushed to 9.2.x and 9.1.x. Thanks!

  • lauriii committed 5deb8d7 on 9.2.x
    Issue #3156260 by anmolgoyal74, Abhijith S, bandanasharma,...

Status: Fixed » Closed (fixed)

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