Pasar al contenido principal
Drupal

Navegación principal

  • Inicio
  • Serveis
  • Portfolio
  • Blog
  • Tutorials
  • Contacte
Menú de cuenta de usuario
  • Iniciar sesión

Mensaje de error

  • User warning: Trying to overwrite a cache redirect with one that has nothing in common, old one at address "languages:language_interface, theme, user.permissions" was pointing to "url.query_args:language", new one points to "languages:language_url". in Drupal\Core\Cache\VariationCache->set() (line 138 of core/lib/Drupal/Core/Cache/VariationCache.php).
  • User warning: Trying to overwrite a cache redirect with one that has nothing in common, old one at address "languages:language_interface, theme, user.permissions" was pointing to "url.query_args:language", new one points to "languages:language_url". in Drupal\Core\Cache\VariationCache->set() (line 138 of core/lib/Drupal/Core/Cache/VariationCache.php).
  • User warning: Trying to overwrite a cache redirect with one that has nothing in common, old one at address "languages:language_interface, route.menu_active_trails:main, theme, user.permissions" was pointing to "url.query_args:language", new one points to "languages:language_url". in Drupal\Core\Cache\VariationCache->set() (line 138 of core/lib/Drupal/Core/Cache/VariationCache.php).
  • User warning: Trying to overwrite a cache redirect with one that has nothing in common, old one at address "languages:language_interface, theme, user.permissions" was pointing to "url.query_args:language", new one points to "languages:language_url". in Drupal\Core\Cache\VariationCache->set() (line 138 of core/lib/Drupal/Core/Cache/VariationCache.php).
  • User warning: Trying to overwrite a cache redirect with one that has nothing in common, old one at address "languages:language_interface, route.menu_active_trails:account, theme, user.permissions, user.roles:authenticated" was pointing to "url.query_args:language", new one points to "languages:language_url". in Drupal\Core\Cache\VariationCache->set() (line 138 of core/lib/Drupal/Core/Cache/VariationCache.php).
  • User warning: Trying to overwrite a cache redirect with one that has nothing in common, old one at address "languages:language_interface, theme, user.permissions" was pointing to "url.query_args:language", new one points to "languages:language_url". in Drupal\Core\Cache\VariationCache->set() (line 138 of core/lib/Drupal/Core/Cache/VariationCache.php).

Ruta de navegación

  1. Inicio
  2. Com es fa per...
  3. Drupal

HOWTO: Adding node type class to body element in Drupal 8

Por joan, 5 Enero, 2017

Method 1: edit your html.html.twig theme template

Add this line at   <body{{ attributes.addClass(classes,:

    node_type ? 'page-node-type-' ~ node_type|clean_class

For example:

  <body{{ attributes.addClass(classes,
    not is_front ? 'with-subnav',
    sidebar_first ? 'sidebar-first',
    sidebar_second ? 'sidebar-second',
    (sidebar_first and not sidebar_second) or (sidebar_second and not sidebar_first) ? 'one-sidebar',
    (sidebar_first and sidebar_second) ? 'two-sidebars',
    (not sidebar_first and not sidebar_second) ? 'no-sidebar',
    node_type ? 'page-node-type-' ~ node_type|clean_class
  ) }}>

Method 2: Try node_type_class module

 

css class
node type
Drupal
Drupal 8
  • Versión para impresión

Enlaces transversales de Book para HOWTO: Adding node type class to body element in Drupal 8

  • Drupal Commerce: mostrar preu al formulari Add to Cart
  • Arriba
  • HOWTO: Com crear alies d'URL als nodes de Drupal 7

Navegación del libro

  • Administració de sistemes
  • CiviCRM
  • Correu electrònic
  • Drupal
    • HOWTO: Com substituir taules per DIV des de ckeditor, per usuaris amb rol d'editor
    • Còpia de seguretat de la web
    • HOWTO: Creació d'un mapa d'establiments a google maps a partir de les adreces d'un full de càlcul
    • External links
    • Llista de correu sobre drupal en català
    • Destacar continguts a la portada
    • Drupal 6
    • Drupal Commerce: mostrar preu al formulari Add to Cart
    • HOWTO: Adding node type class to body element in Drupal 8
    • HOWTO: Com crear alies d'URL als nodes de Drupal 7
    • HOWTO: jump menus in Drupal 8
  • Moodle
  • Calaix de sastre
  • Dolibarr
Canal RSS
Funciona con Drupal