theme rorschach
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
// use Drupal\Core\Url;
|
||||
|
||||
|
||||
function eql_preprocess_html(&$variables) {
|
||||
function rorschach_preprocess_html(&$variables) {
|
||||
$node = \Drupal::routeMatch()->getParameter('node');
|
||||
if ($node){
|
||||
$variables['attributes']['class'][] = 'node-type-' . $node->bundle();
|
||||
@@ -18,7 +18,7 @@ function eql_preprocess_html(&$variables) {
|
||||
}
|
||||
|
||||
|
||||
function eql_preprocess_node(&$variables){
|
||||
function rorschach_preprocess_node(&$variables){
|
||||
$node = &$variables['node'];
|
||||
$variables['attributes']['class'][] = 'node-type-' . $node->gettype();
|
||||
if($node->gettype() == "actualite") {
|
||||
@@ -32,7 +32,7 @@ function eql_preprocess_node(&$variables){
|
||||
|
||||
}
|
||||
|
||||
function eql_preprocess_field(&$variables) {
|
||||
function rorschach_preprocess_field(&$variables) {
|
||||
$node = \Drupal::routeMatch()->getParameter('node');
|
||||
|
||||
$field_name = &$variables['field_name'];
|
||||
@@ -46,7 +46,7 @@ function eql_preprocess_field(&$variables) {
|
||||
|
||||
//////////////////////////////////////////////////
|
||||
|
||||
// function eql_preprocess_field(&$variables){
|
||||
// function rorschach_preprocess_field(&$variables){
|
||||
// $node = &$variables['node'];
|
||||
// $variables['attributes']['class'][] = 'node-type-' . $node->gettype();
|
||||
// if($node->gettype() == "offre_de_service") {
|
||||
@@ -84,13 +84,13 @@ function eql_preprocess_field(&$variables) {
|
||||
|
||||
// counter pour id
|
||||
|
||||
// function eql_preprocess_field(&$variables) {
|
||||
// function rorschach_preprocess_field(&$variables) {
|
||||
// // static $counter = 0;
|
||||
// // $variables['counter'] = $counter++;
|
||||
// $variables['elements']['#paragraph']->item_id;
|
||||
// }
|
||||
// la fonction suivante ne fonctionne pas
|
||||
// function eql_preprocess_field(&$variables) {
|
||||
// function rorschach_preprocess_field(&$variables) {
|
||||
|
||||
// $paragraph = &$variables['paragraph'];
|
||||
// $variables['attributes']['class'][] = 'paragraph-type-' . $paragraph->id();
|
||||
|
||||
Reference in New Issue
Block a user