If the UniqueKey
is based on known object types such as Entities, this works very well. For example, you may need to loop through a list of items, and each item needs a unique key.
⬇️ Result | Source ➡️
-
Title:
Hitchhikers Guide to the Galaxy
- UniqueKey: PJUzHqK3-eid7md5eRsH
-
Title:
Good Omens
- UniqueKey: PJUzHqK3-eidcAcM-LSz
-
Title:
Phishing for Phools
- UniqueKey: PJUzHqK3-eidlkSe34Oo
-
Title:
The Last Continent
- UniqueKey: PJUzHqK3-eid_EnbtOtU
@inherits Custom.Hybrid.RazorTyped
@{
var books = AsItems(App.Data["Books"]);
}
<ol>
@foreach (var book in books) {
<li>
Title: <code>@book.Title</code> - UniqueKey: <code>@Kit.Key.UniqueKeyWith(book)</code>
</li>
}
</ol>