I am setting up a custom theme on a new project (CATSA) based on the starterkit provided in wxt_bootstrap. There is a hook provided in the starterkit for theme suggestions which doesn't work and should be removed (I replaced THEMENAME with my custom theme name "catsa"):
/**
* Implements hook_theme_suggestions_HOOK_alter().
*/
function catsa_theme_suggestions_block_alter(&$suggestions, $variables) {
// Load theme suggestions for blocks from parent theme.
foreach ($suggestions as &$suggestion) {
$suggestion = str_replace('catsa_', 'wxt_bootstrap_', $suggestion);
}
}
With the above code in place, here is an example of the theme output for the Search Form Block:
FILE NAME SUGGESTIONS:
* block--search--gcweb--wxt-bootstrap-wxtsearchform.html.twig
* block--search--wxt-bootstrap-wxtsearchform.html.twig
* block--wxt-bootstrap-wxtsearchform.html.twig
x block--wxt-search-form-block.html.twig
* block--wxt-library.html.twig
* block.html.twig
If I remove this theme suggestion alter from my custom theme I get the following:
FILE NAME SUGGESTIONS:
x block--search--gcweb--catsa-wxtsearchform.html.twig
* block--search--catsa-wxtsearchform.html.twig
* block--catsa-wxtsearchform.html.twig
* block--wxt-search-form-block.html.twig
* block--wxt-library.html.twig
* block.html.twig
This aligns with the name of the block template files in the starterkit. All I have to do now is rename the block template files by replaceing THEMENAME with my theme's name and all works fine.
Fresh install of WxT, copy starterkit in wxt_bootstrap to /html/themes/custom/THEMENAME, set new theme to default and rename the block template files by replacing THEMENAME with your theme name. See the block templates are not taken into account.
Remove the hook_theme_suggestions_HOOK_alter() from starterkit.
Fixed
4.3
WxT Bootstrap
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.