---
title: "indexPath(for:)"
framework: carplay
role: symbol
role_heading: Instance Method
path: "carplay/cplisttemplate/indexpath(for:)"
---

# indexPath(for:)

Returns the index path for the specified item.

## Declaration

```swift
func indexPath(for item: any CPListTemplateItem) -> IndexPath?
```

## Parameters

- `item`: The item to find in the list.

## Return Value

Return Value The item’s index path in the list, or nil if the list doesn’t contain the item.

## See Also

### Getting Supplementary Information

- [maximumItemCount](carplay/cplisttemplate/maximumitemcount.md)
- [itemCount](carplay/cplisttemplate/itemcount.md)
- [title](carplay/cplisttemplate/title.md)
