Skip to content
Snippets Groups Projects
Commit c82ed658 authored by Igor Biki's avatar Igor Biki
Browse files

ISTWCMS-5176: Updating homepage check function.

parent 16d76371
No related branches found
No related tags found
1 merge request!215ISTWCMS-5176: Updating homepage check function.
......@@ -503,8 +503,9 @@ class UWService implements UWServiceInterface {
*/
public static function nodeIsHomePage(int $nid): bool {
$front_page_path = \Drupal::configFactory()->get('system.site')->get('page.front');
$front_page_alias = \Drupal::service('path_alias.manager')->getAliasByPath($front_page_path);
$node_alias = \Drupal::service('path_alias.manager')->getAliasByPath('/node/' . $nid);
return $front_page_path === $node_alias;
return $front_page_alias === $node_alias;
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment