Favorites


Overview

After installing the plugin create a new favorites field:

Favorite Field Creation

Add it to your desired entry type(s) then render it into your templates with one line:

{{ craft.engagement.render(entry.myFavoritesFieldHandle) }}

***Note*** By default the field settings has the field disabled for all entries. This can either be turned on for all entries or the editors will need to be set up with the ability to turn it on an entry by entry basis.

Demo

Default Widget:
A clean, out-of-the-box Favorites widget with a simple toggle interaction. You can customize the text directly in the Craft Admin Panel (including heading and button text for favorite/unfavorite states), no code required, and optionally allow editors/user groups to manage those same text settings per entry.

Favorites Customization Options:
You can customize the Favorites widget entirely in Craft field settings, including icon mode, emoji icon (including pasted emoji), custom SVG icon, before/after favorite colors, guest interaction behavior, and top/bottom text behavior. Like the other widget types, these settings can remain admin-only or be selectively granted to editors and specific user groups through override permissions.

Favorites (2)

Data model and metrics

Use these Favorites field properties in Twig to read favorite totals, current favorite state, display configuration, and text settings. You’ll usually access them from your field handle (for example, entry.favoritesHandle.favoriteCount) and render only the values needed in your template.

Setting Description
enabledWhether the favorites widget is enabled for this entry.
idAggregate record ID for this entry/field/site context.
elementIdCraft element ID this favorites field belongs to.
fieldIdCraft field ID for this favorites field.
siteIdSite ID for this favorites context.
favoriteCountTotal number of favorites for the entry.
isFavoritedWhether the current user/session has favorited this entry.
iconActive icon mode (heart, star, emoji, none, customSvg).
emojiIconEmoji used when icon mode is emoji.
beforeFavoriteColorBackground/color value used before the entry is favorited.
afterFavoriteColorBackground/color value used after the entry is favorited.
customSvgSVG markup used when icon mode is customSvg.
allowGuestInteractionsWhether guests can favorite/unfavorite.
headingTextOptional text shown above the favorites widget.
favoriteTextOptional button text shown before favoriting.
unfavoriteTextOptional button text shown after favoriting (for toggle-off state).

Field settings and Customization

Favorites Preview

The Favorites field settings let you control how the favorite widget looks, behaves, and can be customized by editors. At a high level, you configure visual style (icon mode and colors), interaction rules (guest access), display text, and optional per-entry override permissions for editorial teams.

Widget Preview

The Widget Preview shows a live “Before Interaction” and “After Interaction” example so you can quickly validate icon choice, color states, and text settings before saving. It is a visual check only and does not toggle real favorites.

Icon Appearance

Use Icon Appearance to choose how the favorite control is rendered. Icon Mode supports built-in options (heart, star, emoji, none, and custom SVG). If you select Emoji, set the Emoji Icon. If you select Custom SVG, paste SVG markup for the icon. You can also configure before/after favorite color states.

Favorites Icon Appearance

Favorite Behavior

Default Enabled State determines whether new elements start with the widget enabled. Allow Guest Interactions controls whether non-logged-in visitors can favorite/unfavorite entries.

Favorites Behavior

Text Overrides

Text Overrides controls optional messaging around the widget. Text Above Widget appears above the control, while Favorite Button Text and Unfavorite Button Text define button labels for each state. These fields support tokenized values such as favorite counts and current state.

Favorites Text Overrides

Editor Overrides

Allow Editor Overrides is the master switch for per-entry customization. When enabled, you can grant granular permissions for what editors may change per entry: widget enabled state, preview visibility, icon appearance, icon colors, guest interaction behavior, and text override fields. This keeps defaults consistent while allowing controlled flexibility at the content-entry level.

Favorites Editor Overrides

Template Overrides

Engagement’s Ratings, Likes/Dislikes, and Favorites widgets are fully customizable. For each widget type, you can override the Twig/HTML, CSS, and JavaScript independently, either site-wide or per template/render call, so you can keep a global default while tailoring specific experiences where needed. Full template override details are available here: Template Overrides Documentation.