1

Is there any easy way or what is a good way to change the Bootstrap version in SXA. I have used the 4.6.1 for my frontend design, but I know SXA uses the 4.3.1 version. The way I did it is that I made a Base Theme called Bootstrap 4.6 with all of the styles and scripts folders and files and I injected that base theme to my site theme. Everything works fine but now I have issue where in console it now shows multiple tags of a certain tag. To be more precise here is the picture of what I am trying to say.

enter image description here

Is this something related to me adding the new base theme or?

Here is another example:

enter image description here

Many more!

enter image description here

So is this normal or it is not? I think personally that this issue started to happen when I added this new base theme to my site theme. Beacuse as you can see there are different optimized-min files for everything

1 Answer 1

1

Probably because two Bootstrap themes are loaded now (if you haven't removed previous one).

Take a look on grid definition item /sitecore/system/Settings/Feature/Experience Accelerator/Bootstrap 4/Bootstrap 4 Grid Definition

it has a link to theme specified in Grid Theme field (this is the place where all assets live)

You could replace reference to your theme (it's not recommended to modify SXA items) but I would prefer to create custom bootstrap definition (copy of bootstrap 4 with reference to your theme).

Once you create your custom grid definition (literally just a copy of existing one with modified theme) remember you have to change it for your site (Settings item /sitecore/content/Tenant/Site/Settings, field: Grid Mapping) so logic will take your new grid together with new theme.

That's the way you should configure it.

By default grid theme is injected via code here: Sitecore.XA.Foundation.Grid.Pipelines.AssetService.AddGridTheme, Sitecore.XA.Foundation.Grid (there is no reference in base themes field on a theme - thanks to that you can use single theme with multiple grids)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.