Developers

Item

Whenever you're dealing with a list item in your template, you're actually working with a Item object.

Properties

id

Type: int|null

ID of the item.

elementId

Type: int|null

ID of the linked element.

elementSiteId

Type: int|null

Site ID of the linked element.

elementDisplay

Type: string|null

Display name of the linked element. ie \craft\elements\Entry would be Entry.

element

Type: craft\base\ElementInterface|null

The linked element.

title

Type: string|null

The Title of the linked element.

listId

Type: int|null

ID of the list this item belongs to.

list

Type: verbb\wishlist\elements\ListElement|null

The list this item belongs to.

options

Type: array

Any additional options to store with an item.

optionsSignature

Type: string

An MD5 hash of the options, used for comparing items uniqueness.

Methods

getAddUrl(params)

Returns: string|null

Returns the URL to add an item to a list.

getRemoveUrl(params)

Returns: string|null

Returns the URL to remove an item from a list.

getToggleUrl(params)

Returns: string|null

Returns the URL to toggle an item in a list.

getInList(list)

Returns: bool

Whether this item is in the list (default list or otherwise).

Last updated: Sept 14, 2026, 8:36:51 PM