Hi,
This is related to this old thread: http://ellislab.com/forums/viewthread/42264
I’ve used Jamie Pittock’s “AtoZee” extension to create an aphabetical listing - It works great except a lot of the entry titles begin with odd characters, either [square brackets], “quotation” ‘marks’ of some type, or accented characters - É, Ó mainly. (Which get filed under A for some reason.)
To get around this, I’d like to modify the extension a little so it populates a custom field in the database, so the client can override the title_alpha contents to the correct letter if it needs it. I have created the custom field, which is field_id_157 in the exp_weblog_data table, and have been trying combinations of sql queries in the extension but I’m not a developer so I’m not getting anywhere fast!
Hopefully someone can help with the correct changes, or point me in the right direction.
Thanks.
I think I may have resolved this by using url_title instead of title as the substr target in the extension - Seems to be working out okay so far, and without having to load too much extra work on the client since url_titles are stripped of accents etc. on input. Will see how it goes!
Now I am stuck on how to produce the A to Z links without having blank “No results” pages. Currently I have hard-coded the link list, but it would be great to deactivate letters with no entries - does anyone know how I could check against title_alpha for each letter?
<h3 class="alphapagheader">{segment_3}</h3>
<ul class="alphapaglist">
<li><a href="http://{path=list/a}class=current">A</a></li>
<li><a href="http://{path=list/b}class=current">B</a></li>
<li><a href="http://{path=list/c}class=current">C</a></li>
...
<li><a href="http://{path=list/z}class=current">Z</a></li>
</ul>
{exp:weblog:entries status="open" weblog="dl_images" title_alpha="{segment_3}" orderby="url_title" sort="asc" dynamic="off" limit="50" paginate="bottom"}
{if no_results}No results{/if}
<h4><a href="http://{title_permalink=" title="{title}">{title}</a></h4>
{/exp:weblog:entries}If there are no results for “C” is there a way I can remove the link?
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.