assets Developer

Component icon not used

Question

For my custom component, I want to show the icon. I placed the icons in the /resources/assets/icons folder, but I am not seeing them. Let me know if I misplaced the icons or I need to configure the folders. Thanks.

Answer

Files located in /assets/icons are not accessible. You should add your path in a Jahia-Static-Resources instruction in your pom.xml to allow assets to be readable; by default only /css, /javascript and /img are accessible.

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Jahia-Static-Resources>/css,/assets,/javascript,/img</Jahia-Static-Resources>
                    </instructions>
                </configuration>
            </plugin>
        </plugins>
    </build>