Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new sorting option for featured news. #371

Open
wants to merge 9 commits into
base: master
from

Conversation

Projects
None yet
4 participants
@xchs
Copy link
Contributor

commented Feb 23, 2019

This implements a new sorting option for featured news. News items marked as "featured" are therefore always listed before all other items.

This could be handy in some situations when you can accomplish this kind of sorting with only one newslist module instead of two.

xchs added some commits Feb 23, 2019

Update tl_module.php
Add a new sorting option for featured news.
Update tl_module.xlf
Add a new label for the sorting options.
Update ModuleNewsArchive.php
Add a new sorting option for featured news.
Update ModuleNewsList.php
Add a new sorting option for featured news.

@xchs xchs referenced this pull request Feb 23, 2019

Merged

Sort featured news #4

@leofeyer leofeyer added the feature label Feb 23, 2019

@leofeyer leofeyer added this to the 4.8.0 milestone Feb 23, 2019

@leofeyer leofeyer force-pushed the contao:master branch from 804d2ed to c0fc631 Mar 27, 2019

@jankout

This comment has been minimized.

Copy link

commented Apr 4, 2019

Could we have this feature for events too, please? I think it would be fine to have the same features for the events too.

@leofeyer

This comment has been minimized.

Copy link
Member

commented May 9, 2019

@xchs Is there no need to sort featured news first but descending by date?

@fritzmg

This comment has been minimized.

Copy link
Contributor

commented May 9, 2019

I think it wouldn't hurt to add order_featured_asc as well.

@xchs

This comment has been minimized.

Copy link
Contributor Author

commented May 9, 2019

Is there no need to sort featured news first but descending by date?

@leofeyer That should already be the case, shouldn't it?

@leofeyer

This comment has been minimized.

Copy link
Member

commented May 9, 2019

You are right. 😂

xchs added some commits May 9, 2019

Update tl_module.php
Add an ascending sorting option for featured news as well.
Update tl_module.xlf
Add an ascending sorting option for featured news as well.
Update ModuleNewsArchive.php
Add an ascending sorting option for featured news as well.
Update ModuleNewsList.php
Add an ascending sorting option for featured news as well.
@xchs

This comment has been minimized.

Copy link
Contributor Author

commented May 9, 2019

I think it wouldn't hurt to add order_featured_asc as well.

@fritzmg I have now implemented this as well.

@leofeyer leofeyer force-pushed the contao:master branch 2 times, most recently from 6c52109 to 03f6899 Jun 5, 2019

@leofeyer
Copy link
Member

left a comment

While reviewing this PR, I realized that the solution is wrong. We have to add the "show featured first" option to tl_news.news_featured, because people might also want to combine "order by headline and show featured first" or "order randomly but show featured first".

@xchs
Copy link
Contributor Author

left a comment

I cannot approve it myself but I agree.

@leofeyer leofeyer force-pushed the contao:master branch from 67bdc5c to d42ccf4 Jun 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.