fixed home metatags #1903
This commit is contained in:
		| @@ -31,6 +31,7 @@ | ||||
|         "drupal/leaflet_more_maps": "^2.1", | ||||
|         "drupal/leaflet_more_markers": "^1.1", | ||||
|         "drupal/linked_field": "^1.3", | ||||
|         "drupal/metatag": "^1.21", | ||||
|         "drupal/page_manager": "4.x-dev@dev", | ||||
|         "drupal/panelizer": "^4.4", | ||||
|         "drupal/panels": "^4.6", | ||||
|   | ||||
							
								
								
									
										68
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										68
									
								
								composer.lock
									
									
									
										generated
									
									
									
								
							| @@ -4,7 +4,7 @@ | ||||
|         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", | ||||
|         "This file is @generated automatically" | ||||
|     ], | ||||
|     "content-hash": "9d5df14ac7c6753819935b4de3da5b58", | ||||
|     "content-hash": "92b137f0174eb6369b1116a3fe8fa6e4", | ||||
|     "packages": [ | ||||
|         { | ||||
|             "name": "ajgl/breakpoint-twig-extension", | ||||
| @@ -7445,6 +7445,72 @@ | ||||
|                 "issues": "https://www.drupal.org/project/issues/menu_position" | ||||
|             } | ||||
|         }, | ||||
|         { | ||||
|             "name": "drupal/metatag", | ||||
|             "version": "1.21.0", | ||||
|             "source": { | ||||
|                 "type": "git", | ||||
|                 "url": "https://git.drupalcode.org/project/metatag.git", | ||||
|                 "reference": "8.x-1.21" | ||||
|             }, | ||||
|             "dist": { | ||||
|                 "type": "zip", | ||||
|                 "url": "https://ftp.drupal.org/files/projects/metatag-8.x-1.21.zip", | ||||
|                 "reference": "8.x-1.21", | ||||
|                 "shasum": "677ff7384b557390d4d1a36f335452e8172f741d" | ||||
|             }, | ||||
|             "require": { | ||||
|                 "drupal/core": "^9", | ||||
|                 "drupal/token": "^1.0", | ||||
|                 "php": ">=7.0" | ||||
|             }, | ||||
|             "require-dev": { | ||||
|                 "drupal/devel": "^4.0", | ||||
|                 "drupal/metatag_dc": "*", | ||||
|                 "drupal/metatag_open_graph": "*", | ||||
|                 "drupal/page_manager": "4.x-dev", | ||||
|                 "drupal/panelizer": "4.x-dev", | ||||
|                 "drupal/redirect": "1.x-dev", | ||||
|                 "mpyw/phpunit-patch-serializable-comparison": "*" | ||||
|             }, | ||||
|             "type": "drupal-module", | ||||
|             "extra": { | ||||
|                 "drupal": { | ||||
|                     "version": "8.x-1.21", | ||||
|                     "datestamp": "1657971667", | ||||
|                     "security-coverage": { | ||||
|                         "status": "covered", | ||||
|                         "message": "Covered by Drupal's security advisory policy" | ||||
|                     } | ||||
|                 } | ||||
|             }, | ||||
|             "notification-url": "https://packages.drupal.org/8/downloads", | ||||
|             "license": [ | ||||
|                 "GPL-2.0-or-later" | ||||
|             ], | ||||
|             "authors": [ | ||||
|                 { | ||||
|                     "name": "See contributors", | ||||
|                     "homepage": "https://www.drupal.org/node/640498/committers", | ||||
|                     "role": "Developer" | ||||
|                 }, | ||||
|                 { | ||||
|                     "name": "Dave Reid", | ||||
|                     "homepage": "https://www.drupal.org/user/53892" | ||||
|                 } | ||||
|             ], | ||||
|             "description": "Manage meta tags for all entities.", | ||||
|             "homepage": "https://www.drupal.org/project/metatag", | ||||
|             "keywords": [ | ||||
|                 "Drupal", | ||||
|                 "seo" | ||||
|             ], | ||||
|             "support": { | ||||
|                 "source": "https://git.drupalcode.org/project/metatag", | ||||
|                 "issues": "https://www.drupal.org/project/issues/metatag", | ||||
|                 "docs": "https://www.drupal.org/docs/8/modules/metatag" | ||||
|             } | ||||
|         }, | ||||
|         { | ||||
|             "name": "drupal/page_manager", | ||||
|             "version": "dev-4.x", | ||||
|   | ||||
| @@ -95,6 +95,7 @@ module: | ||||
|   menu_block: 0 | ||||
|   menu_link_content: 0 | ||||
|   menu_ui: 0 | ||||
|   metatag: 0 | ||||
|   mysql: 0 | ||||
|   node: 0 | ||||
|   options: 0 | ||||
|   | ||||
							
								
								
									
										12
									
								
								config/sync/metatag.metatag_defaults.403.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								config/sync/metatag.metatag_defaults.403.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| uuid: 490f6c4e-b4a8-4d76-a73c-061bcc39a496 | ||||
| langcode: fr | ||||
| status: true | ||||
| dependencies: {  } | ||||
| _core: | ||||
|   default_config_hash: RDCkFL0NDt75Gwioooxo1iuA1S50xTVsBOgX__c6wTw | ||||
| id: '403' | ||||
| label: 'page 403 accès refusé' | ||||
| tags: | ||||
|   robots: noindex | ||||
|   canonical_url: '[site:url]' | ||||
|   shortlink: '[site:url]' | ||||
							
								
								
									
										11
									
								
								config/sync/metatag.metatag_defaults.404.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								config/sync/metatag.metatag_defaults.404.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| uuid: b281e67b-f855-4f6b-b21a-bab4ded8378a | ||||
| langcode: fr | ||||
| status: true | ||||
| dependencies: {  } | ||||
| _core: | ||||
|   default_config_hash: puBstSLDz8mbaWU357zaqQDBGMGsJzG0j-TQNQkjg20 | ||||
| id: '404' | ||||
| label: 'Page 404 non trouvée' | ||||
| tags: | ||||
|   canonical_url: '[site:url]' | ||||
|   shortlink: '[site:url]' | ||||
							
								
								
									
										14
									
								
								config/sync/metatag.metatag_defaults.front.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								config/sync/metatag.metatag_defaults.front.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| uuid: 6feef25d-03b1-4d07-92a0-87548e0d77f7 | ||||
| langcode: fr | ||||
| status: true | ||||
| dependencies: {  } | ||||
| _core: | ||||
|   default_config_hash: 1noCXlegCr5HFehQRF1ViXy1jhU1jZ_sNN99a8Sj5jo | ||||
| id: front | ||||
| label: 'Front page' | ||||
| tags: | ||||
|   canonical_url: '[site:url]' | ||||
|   description: '[site:slogan]' | ||||
|   robots: 'index, follow' | ||||
|   shortlink: '[site:url]' | ||||
|   title: '[site:name]' | ||||
							
								
								
									
										11
									
								
								config/sync/metatag.metatag_defaults.global.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								config/sync/metatag.metatag_defaults.global.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,11 @@ | ||||
| uuid: 3c1d8c0c-d3ab-41b3-b695-cee1135514b6 | ||||
| langcode: fr | ||||
| status: true | ||||
| dependencies: {  } | ||||
| _core: | ||||
|   default_config_hash: sL588ui1E_8-2c_UupwyYxcqX2OVyMFp3HTLbbFqvPc | ||||
| id: global | ||||
| label: Global | ||||
| tags: | ||||
|   canonical_url: '[current-page:url]' | ||||
|   title: '[current-page:title] | [site:name]' | ||||
							
								
								
									
										12
									
								
								config/sync/metatag.metatag_defaults.node.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								config/sync/metatag.metatag_defaults.node.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| uuid: 7c8d2b8e-35c8-401d-bdf5-60ff2ba34ad1 | ||||
| langcode: fr | ||||
| status: true | ||||
| dependencies: {  } | ||||
| _core: | ||||
|   default_config_hash: rpwvgyEURXLz_JjgMCrkS1rUv-0k3L79BpO-ReN7fDI | ||||
| id: node | ||||
| label: Content | ||||
| tags: | ||||
|   title: '[node:title] | [site:name]' | ||||
|   description: '[node:summary]' | ||||
|   canonical_url: '[node:url]' | ||||
							
								
								
									
										12
									
								
								config/sync/metatag.metatag_defaults.taxonomy_term.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								config/sync/metatag.metatag_defaults.taxonomy_term.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| uuid: 5e0f73c1-96de-4508-a2d9-b0cce7e55ef7 | ||||
| langcode: fr | ||||
| status: true | ||||
| dependencies: {  } | ||||
| _core: | ||||
|   default_config_hash: 92bXZdyYJ5xqukdfmGRr_CYcwm1vfuS8b8aJ7X_G7E0 | ||||
| id: taxonomy_term | ||||
| label: 'Taxonomy term' | ||||
| tags: | ||||
|   canonical_url: '[term:url]' | ||||
|   description: '[term:description]' | ||||
|   title: '[term:name] | [site:name]' | ||||
							
								
								
									
										12
									
								
								config/sync/metatag.metatag_defaults.user.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										12
									
								
								config/sync/metatag.metatag_defaults.user.yml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,12 @@ | ||||
| uuid: 48b95ba1-e4a3-4dfa-9132-a3307be8cf28 | ||||
| langcode: fr | ||||
| status: true | ||||
| dependencies: {  } | ||||
| _core: | ||||
|   default_config_hash: MvQPTbQx0Vxwy0ordSHyixdZmLCMpvMdLD69dlwkrKc | ||||
| id: user | ||||
| label: User | ||||
| tags: | ||||
|   canonical_url: '[user:url]' | ||||
|   description: '[site:name]' | ||||
|   title: '[user:display-name] | [site:name]' | ||||
| @@ -45,7 +45,7 @@ dependencies: | ||||
| _core: | ||||
|   default_config_hash: P7F4DFe8BL31DRVqsvS-ix9KZZqvvaPjZ7zEvGo9yNM | ||||
| id: content | ||||
| label: Contenu | ||||
| label: Content | ||||
| module: node | ||||
| description: 'Trouver et gérer le contenu.' | ||||
| tag: default | ||||
| @@ -58,7 +58,7 @@ display: | ||||
|     display_plugin: default | ||||
|     position: 0 | ||||
|     display_options: | ||||
|       title: Contenu | ||||
|       title: Content | ||||
|       fields: | ||||
|         node_bulk_form: | ||||
|           id: node_bulk_form | ||||
| @@ -1314,7 +1314,7 @@ display: | ||||
|       path: admin/content/programme | ||||
|       menu: | ||||
|         type: 'default tab' | ||||
|         title: Contenu | ||||
|         title: Content | ||||
|         description: '' | ||||
|         weight: -10 | ||||
|         expanded: false | ||||
| @@ -1323,7 +1323,7 @@ display: | ||||
|         context: '0' | ||||
|       tab_options: | ||||
|         type: normal | ||||
|         title: Contenu | ||||
|         title: Content | ||||
|         description: 'Trouver et gérer le contenu' | ||||
|         weight: -10 | ||||
|     cache_metadata: | ||||
|   | ||||
| @@ -12,7 +12,7 @@ dependencies: | ||||
| _core: | ||||
|   default_config_hash: uvMAn5Qf8Uni989mhr5KY4hx66xkSpP8nFYZMHgj7kY | ||||
| id: taxonomy_term | ||||
| label: 'Terme de taxonomie' | ||||
| label: 'Taxonomy term' | ||||
| module: taxonomy | ||||
| description: 'Contenu associé à un terme de taxonomie donné.' | ||||
| tag: default | ||||
|   | ||||
| @@ -332,7 +332,7 @@ display: | ||||
|           entity_type: user | ||||
|           entity_field: name | ||||
|           plugin_id: field | ||||
|           label: Utilisateur | ||||
|           label: User | ||||
|           exclude: false | ||||
|           alter: | ||||
|             alter_text: false | ||||
|   | ||||
| @@ -187,7 +187,7 @@ display: | ||||
|       display_description: 'Une liste des nouveaux utilisateurs' | ||||
|       display_extenders: {  } | ||||
|       block_description: 'Nouveaux membres' | ||||
|       block_category: Utilisateur | ||||
|       block_category: User | ||||
|     cache_metadata: | ||||
|       max-age: -1 | ||||
|       contexts: | ||||
|   | ||||
 Submodule web/profiles/d8-starterkit-profile updated: 5069345d9d...179aa99415
									
								
							| @@ -19,13 +19,15 @@ function popsu_preprocess_html(&$variables) { | ||||
|   | ||||
|   // | ||||
|   $frontpage = \Drupal::service('path.matcher')->isFrontPage(); | ||||
|   $variables['head_title']['slogan'] = \Drupal::config('system.site')->get('slogan'); | ||||
|   $variables['site_name'] = \Drupal::config('system.site')->get('name');  | ||||
|   $variables['slogan'] = \Drupal::config('system.site')->get('slogan'); | ||||
|   //var_dump($variables['head_title']); | ||||
|   if( $frontpage == true){ | ||||
|    $variables['head_title'] = $variables['head_title']["name"]." | ".$variables['head_title']['slogan']; | ||||
|   }else{ | ||||
|     $variables['head_title'] = $variables['head_title']["name"]; | ||||
|    $variables['head_title'] = [$variables["site_name"], $variables['slogan']]; | ||||
|   } | ||||
|   // else{ | ||||
|   //   $variables['head_title'] = $variables['site_name']; | ||||
|   // } | ||||
|   if ($node){ | ||||
|     if($node->hasField('field_programme') && $node->get('field_programme')->getString() != ""){ | ||||
|       $variables['attributes']['class'][] = 'programme-' . $node->get('field_programme')->getString(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user