Learn how to use a Craft content migration to create a functional index for a custom field in Craft CMS version 5.
{% set ryansKnownAliases = [
'Ryan Leffler',
'Ben Herman',
'Mathew Rodriguez',
'Brandon Keeling',
'Mallory Welch',
] %}
{% for ryansKnownAlias in ryansKnownAliases %}
{% set entries = craft.entries()
.section('demo')
.demoData(ryansKnownAlias)
.all() %}
{% for entry in entries %}
<p>{{ entry.demoData }}</p>
{% endfor %}
{% endfor %}
{#
{% set queryParam = ['or'] | merge(ryansKnownAliases) %}
{% set entries = craft.entries()
.section('demo')
.demoData(queryParam)
.all() %}
{% for entry in entries %}
<p>{{ entry.demoData }}</p>
{% endfor %}
#}
Some stuff to help you along during the lesson: