I have multiple pages with different content type. All the pages 1st path component is same. So, I want to define a custom twig page template to these pages by their 1st path component.
Eg. I have pages with the URL like program/one, program/two, program/three and program/ten from the different content type and I want to apply page--program.html.twig
template only these specific pages by checking their 1st path component (eg. program/*).
Anyone help me, how to do this?
hook_theme_suggestions_alter
– Beebee May 11 '18 at 8:40page--program.html.twig
should work out of the box for ' /program/*' – 4k4 May 11 '18 at 9:56/program/*
. IIRC, aliases are not counted for such template suggestions. He has to either usepage--node--[nid].html.twig
or make the suggestions himself. If that's the case @PunyaRuchal see: drupal.stackexchange.com/questions/205567/… – Beebee May 11 '18 at 10:51