Show latest list sorted by creation date

Hi, I have seen few topics with the solution I am looking for.

I think my question is very similar to latest @abcoathup question in this post.

However, this was not answered. How can I configure my discourse site so that when users enter the main address they jump directly to mysitedomain/latest?order=created ?

And additionally, when users press on the button latest, how I configure the site so that they are re-directed to mysitedomain/latest?order=created. ?

Thanks!

1 Like

This is not possible at the current time, nor is it planned.

You can use search, if you select “sort by latest topic”.

1 Like

Hi @codinghorror, can you point me the way to search how I can modify this? I would love to see the latest list sorted by creation date.

I (kinda) solve this on my forum by using redirect links, thanks to this post:



Change yoursite.com for the name of your site.

NOTE: If you are a developer, please understand that I’m not. Please dont hate me for doing this :stuck_out_tongue_closed_eyes: I know this is not the proper way to do this.

I get this to work by modifying this component a litter bit, that is, adding a button for ‘sorted by date’

where I passed in a url query in setting by:

unfinished; unfinished; ?tags=unfinished
created-time; created-time; ?order=created

and check search param in the script:


  api.modifyClass("component:navigation-item", {
    active: Ember.computed("contentFilterMode", "filterMode", function() {
      let contentFilterMode = this.get("content").get("filterMode");

      if (decodeURIComponent(window.location.search) === location) { // check search param
        return contentFilterMode.includes(filter); // if includes this param, active = true;
      } else {
        return this._super(contentFilterMode, this.get("filterMode"));
      }
    })
  });

This works for me but this script will refresh whole page rather than just the inner part, is there a way I can make it only refresh inner topic component?