oc-shopaholic / oc-good-news-plugin

📰 News (blogging) plugin for October CMS
https://octobercms.com/plugin/lovata-goodnews
GNU General Public License v3.0
25 stars 10 forks source link

Please add method list newest #36

Closed ANZ504 closed 2 years ago

ANZ504 commented 2 years ago

Currently you can't filter by the newest post. Please add that method.

published() It applies a filter by publishing status and publish the date for the elements of a collection.

Thank you

igor-tv commented 2 years ago

Hello,

Try applying the sort('publish|desc') method on your collection.

ANZ504 commented 2 years ago

What I want to achieve is to use the new status and put a start and end date of a new news.

And so manage to create a component in which to place the new news that are updated in the established arrows

Captura de Pantalla 2022-08-14 a la(s) 07 43 25

igor-tv commented 2 years ago

Perhaps I misunderstood you. But by design, only articles with the Published status should be included in the collection. There are other tools for sorting and grouping articles, and this is not an article status. But you can extend the plugin logic as you need.

ANZ504 commented 2 years ago

So the start and stop dates do not have a clear functionality?

The last question :)

igor-tv commented 2 years ago

It works like this. If an article has a status of Published, it will only be added to the collection if the current date is within the start and stop date of the article's publication.

ANZ504 commented 2 years ago

thx