No bootstrap colums displayed with layout builder

Created on 3 May 2024, about 1 month ago

Problem/Motivation

I'm using varbase profile with gin admin theme as front and admin theme (Gin 8.x-3.0-rc10 (default theme, administration theme)
- installed gin_lb and enabled it
- rebuild, clear caches
- using layout builder for 1 content type node
- add two column bootstrap

The result is :
layout builder is not displaying it, front end is also not displaying it. All colums are stacked.

When using layout builder with other bootstrap theme (like Vartheme (Bootstrap 4 - SASS)) it works.

It is possible bootstrap is not loaded or included in the gin admin theme?
If so how to include it?

πŸ’¬ Support request
Status

Closed: works as designed

Component

User interface

Created by

πŸ‡³πŸ‡±Netherlands myDrupal2014_846824658246

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • πŸ‡¨πŸ‡­Switzerland saschaeggi Zurich

    I'm closing this as Gin is an admin theme and not a frontend theme (even though you can use it as one).

    I'm pretty sure you'll need to inject the libraries. Best is to reach out in the Varbase issue queue. I know they're also using Gin heavily so they might know an easy solution for your issue.

    Otherwise you might want to create a small helper module and inject the libraries yourself, see also https://www.drupal.org/docs/contributed-themes/gin-admin-theme/custom-th... β†’

    Cheers

  • Status changed to Closed: works as designed about 1 month ago
  • πŸ‡¨πŸ‡­Switzerland saschaeggi Zurich
  • πŸ‡³πŸ‡±Netherlands myDrupal2014_846824658246

    Thanks, i looked into it and this was indeed the case.

    I solved it by installing https://www.drupal.org/project/bootstrap_library β†’ by composer

    Then filled in the setting:
    use CDN
    use composer installed libs
    for the themes you want
    all pages
    css and js files

    And in the custom module the code:

    if (\Drupal::moduleHandler()->moduleExists('bootstrap_library')) {
    $library = theme_get_setting('bootstrap_barrio_library');
    switch ($library) {
    case 'cdn' :
    $variables['#attached']['library'][] = 'bootstrap_library/bootstrap-cdn';
    break;
    case 'production':
    $variables['#attached']['library'][] = 'bootstrap_library/bootstrap';
    break;
    case 'development':
    $variables['#attached']['library'][] = 'bootstrap_library/bootstrap-dev';
    break;
    }
    }

    thxs all

Production build 0.69.0 2024