Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

sortcomments

Example module to change the sort order of comments in Drupal 8 using function hook_query_TAG_alter. It is possible to configure sort order (newer or older first) per comment field, using the "comment field configuration" in "manage fields and settings" for your content type.

Corresponding issue for Drupal 7:

=> https://www.drupal.org/node/1095656

Drupal 8.2.x database.api.php / Perform alterations to a structured query for a given tag:

=> https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Database%21database.api.php/function/hook_query_TAG_alter/8.2.x

Advanced comment field configuration

configuration

Preview

preview sort flat

sort_flat

preview sort threaded

sort_threaded

About

Drupal 8 | Alter comments query to order by DESC as well as the default ASC.

Resources

Releases

No releases published

Packages

No packages published