0

I want to add a bootstrap panel (https://drupal-bootstrap.org/api/bootstrap/templates%21bootstrap%21bootstrap-panel.html.twig/8) to the output of my controller. My active theme is a drupal/bootstrap theme derivative. I know that I can do it with a #type='container' and adding some "panel" classes to it.

But is there also a way like:

$build['test'] = [
  "#theme" => "bootstrap-panel",
  '#body' => "HELLO World",
  '#heading' => "HELLOHEAD",
  '#panel_type' => 'default',
];

Unfortunately, that doesn't work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.