Jump to content

Wikipedia:Favorite templates

From Wikipedia, the free encyclopedia
(Redirected from Help:Favorite templates)

Favorite templates is a feature for registered (logged-in) users to save a list of templates they can easily choose from when inserting templates with certain tools. It was added to MediaWiki in July 2025. See mw:Help:TemplateData/Template discovery#Favourite templates for another description and this June 2025 Village Pump (technical) discussion for background. This feature was created by WMF developers based on a Community Wishlist request. At that latter page, there are screen shots showing how the feature works.

For users with the default (Vector 2022) skin, also the Vector Legacy and Timeless skins, a bookmark icon appears next to the watchlist star icon on every page (except /doc, /sandbox, and /testcases subpages) in the template namespace. Clicking the bookmark saves a template to a list inside the Visual Editor's Insert Template dialog box and the insert template icon in the source editor toolbar. If you are on a template subpage then only the subpage is saved. After saving a template, the icon changes to a similar icon which can be clicked to unsave the template. Templates can also be unsaved from the list of favorite templates when you insert a template.

To hide the bookmark icon completely (e.g. if you use an editor that has no way to make use of "favorite templates"), you can add this to your CSS:

/* Hide the new (July 2025) "add to favorites" template bookmark icon */
.mw-list-item.ext-templatedata-caction-favorite { 
  display:none;
}

If you use older skins (MonoBook, Modern, Cologne Blue), the bookmark icon is replaced with a tab or link reading "Add template to favorites".

Icon messages

[edit]

These messages may appear when you hover or click the icon:[1]

  • "Add template to favorites" – if you hover over the icon
  • "Template added to favorites" – if you click it
  • "Remove template from favorites" – if you hover when you have already clicked it
  • "Template removed from favorites" – if you click it again
  • "Unable to save favorites" – if an error occurs when you click
  • "You must be logged in to favorite a template" – may be displayed instead of the above
  • "You have reached the maximum number (50) of favorite templates. Please remove some from your list before adding more." – if you click after reaching 50 favorite templates

Phabricator tasks

[edit]
  • T367428 – Favoriting Templates
  • T390019 – Add favorite button next to watch star on template pages