Loading field_longtext_pager.module +3 −13 Original line number Diff line number Diff line Loading @@ -3,11 +3,7 @@ /** * @file * Adds paging capabilities to long text fields in Drupal 8. * @author Dan Greenman. * * Inspiration and algorithms adapted from Drupal 7 smart_paging module. * Credit and gratitude to: * @author Roland Michael dela Peña. */ use Drupal\Component\Utility\Html; Loading Loading @@ -87,7 +83,6 @@ function field_longtext_pager_entity_display_build_alter(&$build, $context) { // Fetch the entity settings. $entity_type = $context['entity']->getEntityTypeId(); $entity_id = $context['entity']->id(); $entity = $context['entity']; $bundle = $context['entity']->bundle(); // Load the field longtext pager display settings helper service. Loading Loading @@ -191,7 +186,7 @@ function field_longtext_pager_insert_pagebreak_placeholders( } foreach ($tag_pairs_map as $tag_name => $map) { foreach ($tag_pairs_map as $map) { foreach ($map as $open_tag_pos => $close_tag_pos) { if ( ( Loading Loading @@ -406,9 +401,6 @@ function canonical() { ['node' => $nid], ['absolute' => TRUE] )->toString(); // Create nopager url. $nopager_url = "$canonical_url?nopager=1"; } // Get current node ID and canonical URL from route. Loading @@ -424,8 +416,6 @@ function canonical() { // TODO. $canonical_url = $canonical_url->toString(); $nopager_url = "$canonical_url?nopager=1"; } // Alter prev, next and canonical URLs to paged links. $prev_subpage_index = $subpage_index - 1; Loading Loading
field_longtext_pager.module +3 −13 Original line number Diff line number Diff line Loading @@ -3,11 +3,7 @@ /** * @file * Adds paging capabilities to long text fields in Drupal 8. * @author Dan Greenman. * * Inspiration and algorithms adapted from Drupal 7 smart_paging module. * Credit and gratitude to: * @author Roland Michael dela Peña. */ use Drupal\Component\Utility\Html; Loading Loading @@ -87,7 +83,6 @@ function field_longtext_pager_entity_display_build_alter(&$build, $context) { // Fetch the entity settings. $entity_type = $context['entity']->getEntityTypeId(); $entity_id = $context['entity']->id(); $entity = $context['entity']; $bundle = $context['entity']->bundle(); // Load the field longtext pager display settings helper service. Loading Loading @@ -191,7 +186,7 @@ function field_longtext_pager_insert_pagebreak_placeholders( } foreach ($tag_pairs_map as $tag_name => $map) { foreach ($tag_pairs_map as $map) { foreach ($map as $open_tag_pos => $close_tag_pos) { if ( ( Loading Loading @@ -406,9 +401,6 @@ function canonical() { ['node' => $nid], ['absolute' => TRUE] )->toString(); // Create nopager url. $nopager_url = "$canonical_url?nopager=1"; } // Get current node ID and canonical URL from route. Loading @@ -424,8 +416,6 @@ function canonical() { // TODO. $canonical_url = $canonical_url->toString(); $nopager_url = "$canonical_url?nopager=1"; } // Alter prev, next and canonical URLs to paged links. $prev_subpage_index = $subpage_index - 1; Loading