-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
module articles category - add random order option #8538
Conversation
$articles->setState('list.ordering', $params->get('article_ordering', 'a.ordering')); | ||
$articles->setState('list.direction', $params->get('article_ordering_direction', 'ASC')); | ||
$ordering = $params->get('article_ordering', 'a.ordering'); | ||
if (trim($ordering) == 'rand()') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a clean line bevor the if
? I think as we don't require rand()
we should use random
as option value as i think it is better readable what do you think?
I have just comment on two issues. I can test it later today ;) |
I have tested this item ✅ successfully on eb2ddf1 This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8538. |
as for comment use random instead of rand()
as per comment add a blank line before if and changed rand() to random
comments should be ok now ;) |
Great 👍 |
I have tested this item ✅ successfully on 72d60ce This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8538. |
Thanks for testing - setting RTC This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8538. |
I have tested this item ✅ successfully on 72d60ce This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/8538. |
follow up #6648
add random order option to articles category module
How to test
apply the patch
select the random option on
Article Field to Order By
Expected result
the articles are showed randomly orderdered
Additional comment
should work on all supported db's