I added a new content type naming 'Custom Page'. I want to create a new template for all of the content with the content type 'Custom Page'.
I added the below code into my custom.theme file:
function yan_theme_suggestions_page_alter(array &$suggestions, array $variables) {
if ($node = \Drupal::routeMatch()->getParameter('node')) {
$suggestions[] = 'page__' . $node->bundle();
}
I understand that it needs to create a file xxx.html.twig in theme/custom/templates, right?