Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Fairly significant refactor from 7.x-1.1 that allows the module to set the read more on any entity and any view mode1.
Note to users of rc1 and rc22.
By default the read more link would show by default for non-teaser node view modes that are not excluded. This would be a regression for most users having these show up by default, so the default behavior on non-teaser view modes is to hide.
The module now supports any entity and any view mode.
There are some restrictions to this:
Entities must directly or indirectly define entity_url() and entity_label() callbacks. Within core, this is limited to: Nodes, Users, Terms and Comments.
Entities must support more than these view modes: full, search_index, token. This means that only nodes will have support by default as these also have the rss, teaser and search_results view modes.
Full (full) or default view modes can never have a read more link. This would be where the link goes to anyway!
There are a small number of excluded view modes:
Full: No point linking to itself...
Search Index: This should reflect the full view mode and is only seen internally.
Token: Custom mode for token generation
Diff 7.x-3.x view modes: Comparisons shouldn't have links
Customizations of the Read more link itself is now included, and most (if not all) text based options include token support.
Settings are defined per supported entity in the entity display settings or (better) done globally per entity type @ admin > configuration > content authoring > read more control
The module now supports any entity and any view mode.
There are some restrictions to this:
Entities must directly or indirectly define entity_url() and entity_label() callbacks. Within core, this is limited to: Nodes, Users, Terms and Comments.
Entities must support more than these view modes: full, search_index, token. This means that only nodes will have support by default as these also have the rss, teaser and search_results view modes.
Full (full) or default view modes can never have a read more link. This would be where the link goes to anyway!
There are a small number of excluded view modes:
Full: No point linking to itself...
Search Index: This should reflect the full view mode and is only seen internally.
Token: Custom mode for token generation
Diff 7.x-3.x view modes: Comparisons shouldn't have links
Customizations of the Read more link itself is now included, and most (if not all) text based options include token support.
Settings are defined per supported entity in the entity display settings or (better) done globally per entity type @ admin > configuration > content authoring > read more control
The module was incorrectly using hook_hook_info(). This did not lead to issues with core or any other known modules, but if any other contrib. module had defined the module groups node or admin, both this module and that module would loss the autoload functionality.