theme rorschach

This commit is contained in:
2023-06-07 15:41:24 +02:00
parent 5215892dbf
commit 9972a4084e
175 changed files with 41653 additions and 17 deletions
+6 -6
View File
@@ -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();