Learn how to use a Craft content migration to create a functional index for a custom field in Craft CMS version 5.
Streamed on May 16, 2024
{% 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: