Skip to content
Snippets Groups Projects
Unverified Commit 0429a079 authored by weaver299's avatar weaver299 Committed by GitHub
Browse files

Merge pull request #406 from ASCWebServices/canini-2

fixing revisions for landing pages error
parents 7feb8d43 5a6705da
No related branches found
No related tags found
No related merge requests found
......@@ -55,8 +55,8 @@ function asc_bootstrap_theme_suggestions_page_alter(array &$suggestions, array $
* adds content type to variable to be used in paragraph twig files.
*/
function asc_bootstrap_preprocess_paragraph(&$variables) {
$node = \Drupal::request()->attributes->get('node');
if ($node != null) {
if (\Drupal::routeMatch()->getRouteName() == 'entity.node.canonical') {
$node = \Drupal::routeMatch()->getParameter('node');
$variables['page_content_type'] = $node->getType();
}
}
......
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