Skip to content

medienverbinder/sortcomments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published