Skip to content
Snippets Groups Projects
Commit 235009b7 authored by Ahmad  Abbad's avatar Ahmad Abbad Committed by Rajab Natshah
Browse files

Issue #2915966 by Ahmad Abbad: Fixed Revisions review issue: revert content...

Issue #2915966 by Ahmad Abbad: Fixed Revisions review issue: revert content does not work for Landing page content type
parent dd120a97
No related branches found
No related tags found
No related merge requests found
......@@ -12,8 +12,12 @@
*/
function VARTHEME_SUBTHEME_theme_suggestions_page_alter(array &$suggestions, array $variables) {
if ($node = \Drupal::routeMatch()->getParameter('node')) {
$content_type = $node->bundle();
$suggestions[] = 'page__' . $content_type;
if(is_numeric($node)) {
$node = \Drupal\node\Entity\Node::load($node);
}
if($node instanceof \Drupal\node\NodeInterface) {
array_splice($suggestions, 1, 0, 'page__' . $node->bundle());
}
}
}
......
......@@ -12,8 +12,12 @@
*/
function vartheme_theme_suggestions_page_alter(array &$suggestions, array $variables) {
if ($node = \Drupal::routeMatch()->getParameter('node')) {
$content_type = $node->bundle();
$suggestions[] = 'page__' . $content_type;
if(is_numeric($node)) {
$node = \Drupal\node\Entity\Node::load($node);
}
if($node instanceof \Drupal\node\NodeInterface) {
array_splice($suggestions, 1, 0, 'page__' . $node->bundle());
}
}
}
......
......@@ -12,8 +12,12 @@
*/
function vartheme_admin_theme_suggestions_page_alter(array &$suggestions, array $variables) {
if ($node = \Drupal::routeMatch()->getParameter('node')) {
$content_type = $node->bundle();
$suggestions[] = 'page__' . $content_type;
if(is_numeric($node)) {
$node = \Drupal\node\Entity\Node::load($node);
}
if($node instanceof \Drupal\node\NodeInterface) {
array_splice($suggestions, 1, 0, 'page__' . $node->bundle());
}
}
}
......
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