We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Advice on modifying ext.atozee to handle foreign characters

Development and Programming

birdie's avatar
birdie
68 posts
15 years ago
birdie's avatar birdie

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.

       
birdie's avatar
birdie
68 posts
15 years ago
birdie's avatar birdie

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!

       
birdie's avatar
birdie
68 posts
15 years ago
birdie's avatar birdie

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?

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.