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';
  }
}  

 

 

Comments

Add new comment

Restricted HTML

Search

Page Facebook

Become a patron

If you need some help or you search a Drupal freelancer don't hesitate to contact us.

 

Contact Us

All the content is FREE but I still need your help

 

Become a patreon