bootstrap
priority
resources
Developer
Jahia 7.3
Jahia 8
Can't override bootstrap.min.css when using Jahia Bootstrap4 module
Question
We want to use our own version of bootstrap4.min.css with a custom theme.
When putting this file in a module on a css directory, our file is not served. We call the resource using this instruction
<template:addResources type="css" resources="bootstrap.min.css"/>
Answer
In Bootstrap 4, the module bootstrap4-core use a Jahia-Module-Priority
of 2.
So if you want to use your own version of bootstrap.min.css, then you should use a Jahia-Module-Priority bigger than 2
You can do this in your pom.xml
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Jahia-Module-Priority>10</Jahia-Module-Priority>
</instructions>
</configuration>
</plugin>
</plugins>
</build>