Jump to content

Custom Blog turned Glossary Post Order

Recommended Posts

Running Bedford 7.0. We created a custom glossary using blog post functionality. The posts under each letter are in post order; we're trying to switch it to alphabetical order.

We created a configuration file in developer mode with the following. Does anyone have any suggestions on changing the sort order?

{
    "title" : "Glossary",
    "ordering" : "chronological",
    "addText" : "Add Glossary",
    "acceptTypes": ["text"]
}

the .list file that controls the page is here:

<div class="glossary-list">

  {.repeated section items}
  <article class="entry h-entry {@|item-classes}" id="article-{id}" data-item-id="{id}">

    <header class="entry-header">
      
      <h1 data-content-field="title" class="entry-title p-name">
      {.passthrough?}
        <a href="{sourceUrl}" class="entry-title-passthrough" target="_blank">{title}</a>
      {.or}
        <a href="{fullUrl}" class="u-url" rel="bookmark">{title}</a>
      {.end}
      </h1>
    </header>

    <div class="entry-content">
      {.excerpt?}
        <div class="p-summary">{excerpt}</div>
        <p class="entry-more-link"><a data-read-more="{localizedStrings.readMore}" href="{fullUrl}"></a></p>
      {.end}
    </div>

  

    {.if postItemInjectCode}<div class="entry-injection">{postItemInjectCode}</div>{.end}

  </article>
  {.end}

  {.if pagination}
  <nav class="pagination clear" data-paginate="scroll">
    <div class="newer">{.if pagination.prevPage}<a href="{pagination.prevPageUrl}" rel="prev"><span class="prev-label">{localizedStrings.newerPosts}</span></a>{.end}</div><!-- comment the linebreak between these two elements because science
        --><div class="older">{.if pagination.nextPage}<a href="{pagination.nextPageUrl}" rel="next"><span class="next-label">{localizedStrings.olderPosts}</span></a>{.end}</div>
  </nav>
  {.end}

</div>

 

Link to comment
  • Replies 2
  • Views 213
  • Created
  • Last Reply

Top Posters In This Topic

On 5/5/2023 at 5:04 PM, Matt-Swarm said:

we're trying to switch it to alphabetical order.

We created a configuration file in developer mode with the following. Does anyone have any suggestions on changing the sort order?

In the .conf file, the ordering key pair is used to set the collection order, but the available values are chronological, user-orderable and calendar. There isn't an alphabetical option.

About me: I'm Paul, a SQSP user for over 18 yrs and a Circle Leader since 2017. I value honesty, transparency, diversity and good design ♥.
Work: Founder of SF.DIGITAL, providing high quality original extensions to supercharge your Squarespace website. 
Content: Views and opinions are my own. Links in my posts may refer to my own SF.DIGITAL products or may be affiliate links.
Forum advice is completely free. You can thank me by selecting a feedback emoji below. Buying a coffee is optional.

Book paid help with domains: Connect a GoDaddy domain. Connect a Squarespace Domain. Domain assistance

Link to comment

Looks like the option is to modify the blog published date manually...

BeyondSpace - Squarespace Website Developer

🖼️ Lightbox Studio (Enable Pinch/Zoom on lightbox)
🗓️ Delivery Date Picker (Squarespace Date picker form field)
💫 Gallery block 7.1 workaround
🥳 Sparkplugin Customisations Browsers (Browse +100 Spark plugin customisations)
🥳 Elfsight Template Browsers (Browse +1000 Elfsight widget Templates)

If you find my answer useful, let's leave a like or upvote so others with the same issue can find their solution. Thank you!

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.