CMS Development

jjimeno
Participant | Diamond Partner
Participant | Diamond Partner

Sorting blog articles through a filter dropdown

SOLVE

Hi, 

We have a blog listing page displaying all articles related to a certain tag. Page url looks like this: /blog/tag/{tag-name}

One feature of this page is to filter posts by Most Popular and Latest articles through a dropdown box. My question is how do we achieve this that when the option is selected, the articles will be sorted in an "ajax" kind of way and without having to reload the page. Is this possible? 

 

Thank you!

0 Upvotes
1 Accepted solution
Kevin-C
Solution
Recognized Expert | Partner
Recognized Expert | Partner

Sorting blog articles through a filter dropdown

SOLVE

Hey @jjimeno 

 

There are quite a few ways to implement this. See here

 

This article provides the pieces to implement sorting on the ui.

 

I'd imagine you could add 2 data attributes and use those to sort rather than innerHTML like the article shows.

 

Hope this gets you going in the right direction.

Kevin Cornett - Sr. Solutions Architect @ BridgeRev

View solution in original post

2 Replies 2
Kevin-C
Solution
Recognized Expert | Partner
Recognized Expert | Partner

Sorting blog articles through a filter dropdown

SOLVE

Hey @jjimeno 

 

There are quite a few ways to implement this. See here

 

This article provides the pieces to implement sorting on the ui.

 

I'd imagine you could add 2 data attributes and use those to sort rather than innerHTML like the article shows.

 

Hope this gets you going in the right direction.

Kevin Cornett - Sr. Solutions Architect @ BridgeRev
natsumimori
Community Manager
Community Manager

Sorting blog articles through a filter dropdown

SOLVE

Hi @jjimeno ,

 

Thank you for sharing your question in the Community.

@Stephanie-OG and @DanielSanchez , could you please share your suggestion for @jjimeno ?

0 Upvotes