Please Disable Your Browser Adblock Extension for our site and Refresh This Page!

our ads are user friendly, we do not serve popup ads. We serve responsible ads!

Refresh Page
Skip to main content
On . By CodimTh
Category:

in this post, I'll show you how to make theme suggestions for pagers in drupal 8.

<?php

/**
 * @param array $suggestions
 * @param array $variables
 * @param $hook
 */
function mymodule_theme_suggestions_pager_alter(array &$suggestions, array $variables, $hook)
{
  $var = \Drupal::routeMatch()->getParameter('entity');
  if (isset($var) && !empty($var->getEntityTypeId()) && $var->getEntityTypeId() == "search_page") {
    $suggestions[] = $hook . '__search__page';
  }
}  

 

 

Riadh Rahmi

Senior Web Developer (Drupal & Laravel)

I am a senior web developer, I have experience in planning and developing large scale dynamic web applications especially in Drupal, Laravel.

Web Posts

Search

Page Facebook