| 12345678910111213141516171819202122232425262728293031323334353637383940414243 | 
							- <?php
 
- /*
 
- 	* @files
 
- 	* Theme Template Funtions
 
- */
 
- // use Drupal\Core\Template\Attribute;
 
- // use Drupal\Core\Link;
 
- // use Drupal\Core\Url;
 
- function eql_preprocess_html(&$variables) {
 
-   $node = \Drupal::routeMatch()->getParameter('node');
 
-   if ($node){
 
-     $variables['attributes']['class'][] = 'node-type-' . $node->bundle();
 
-     $variables['attributes']['class'][] = 'node-id-' . $node->id();
 
-   }
 
- }
 
- function eql_preprocess_node(&$variables){
 
-   $node = &$variables['node'];
 
-   $variables['attributes']['class'][] = 'node-type-' . $node->gettype();
 
-   if($node->gettype() == "actualite") {
 
-     $actu_type = $node->get('field_actu_type')->getString();
 
-     $variables['attributes']['class'][] = 'actu-type-' . $actu_type;
 
-   }
 
- }
 
- ///////////////////////////////////////////////////
 
- // counter pour id
 
- // function eql_preprocess_field(&$variables) {
 
- //   static $counter = 0;
 
- //   $variables['counter'] = $counter++;
 
- // }
 
- // function MYTHEME_preprocess_views_view_fields__view_machine_name(&$vars) {
 
- //   static $counter = 0;
 
- //   $vars['counter'] = $counter++;
 
- // }
 
 
  |