I'm using Stash to create an A-Z page, that will simply loop through each {title} from the Pages module, using the match/against regex as follows;
{exp:channel:entries channel="page" sort="asc" orderby="title" dynamic="no"}
{exp:stash:set_list name="pages_a" parse_tags="yes" match="#^A#" against="{title}"}
{stash:title_a}{title}{/stash:title_a}
{stash:url_title_a}{url_title}{/stash:url_title_a}
{/exp:stash:set_list}
{exp:stash:set_list name="pages_b" parse_tags="yes" match="#^B#" against="{title}"}
{stash:title_b}{title}{/stash:title_b}
{stash:url_title_b}{url_title}{/stash:url_title_b}
{/exp:stash:set_list}
{exp:stash:set_list name="pages_c" parse_tags="yes" match="#^C#" against="{title}"}
{stash:title_c}{title}{/stash:title_c}
{stash:url_title_c}{url_title}{/stash:url_title_c}
{/exp:stash:set_list}
{/exp:channel:entries}
<h4>A</h4>
<ul>
{exp:stash:get_list name="pages_a"}
<li><a href="/{url_title_a}">→ {title_a}</a></li>
{/exp:stash:get_list}
</ul>
<h4>B</h4>
<ul>
{exp:stash:get_list name="pages_b"}
<li><a href="/{url_title_b}">→ {title_b}</a></li>
{/exp:stash:get_list}
</ul>
<h4>C</h4>
<ul>
{exp:stash:get_list name="pages_c"}
<li><a href="/{url_title_c}">→ {title_c}</a></li>
{/exp:stash:get_list}
</ul>
However, it is only returning one entry for each get_list/letter. I was wondering if anyone can spot something that I am missing?
Admittedly the code is a little more verbose than it perhaps needs to be.
Thanks.