ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Sorting entries alphabetically by title

February 17, 2012 9:08am

Subscribe [2]
  • #1 / Feb 17, 2012 9:08am

    jmulkey

    11 posts

    I know this is basic stuff, but I’m completely stumped as to why my orderby=”title” sort=“asc” parameters are not working. Seems like I’m getting a randomly sorted list of entires. Anyone see a problem with this code?

    {exp:channel:entries channel="test_menu" paginate="bottom" limit="10" orderby=”title” sort="asc"}
         {if no_results}There are currently no tests in this category.{/if}
         <h4><a href="http://{page_url}">{title}</a></h4>
    <p>     <strong>Test Code</strong>{test_code}<br />
         <hr><br />
         {paginate}<br />
          Page {current_page} of {total_pages} pages {pagination_links}<br />
         {/paginate}<br />
        {/exp:channel:entries}

  • #2 / Feb 17, 2012 9:26am

    Design by Front

    106 posts

    Those quotes around orderby=“title” look a bit suspect. Sometimes if you’ve copied and pasted code into EE you can get bad quote marks, can you try deleting them and typing them manually?

    Might also be worth adding dynamic=“no” to ensure nothing in the URL is interfering with your entries.

  • #3 / Feb 17, 2012 9:32am

    jmulkey

    11 posts

    That was it. Just retyped the quotes around “title” and the entries are sorting alphabetically. Thanks for your help Front!

  • #4 / Feb 17, 2012 9:52am

    Design by Front

    106 posts

    No worries 😊 glad you got sorted

  • #5 / Feb 18, 2012 12:59pm

    Dan Decker

    7338 posts

    glad you got sorted

    I see what ya did there 😉

    jmulkey,

    I’m glad Front was able to get you on the right path. If you need anything else in the future, just let us know in a new thread.

    Cheers!

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases