-1

Hi please help to change the admin logo in broad-leaf. and where the images and templates are located in admin. i have already done searching the file structure but i wont find the images folder there. please help to solve the issue thanks in advance.

Santosh Raju
  • 156
  • 2
  • 13
  • We need to see a [Minimal, Complete, and Verifiable example](https://stackoverflow.com/help/mcve) that reproduces the problem, to be able to diagnose it – RoyaumeIX Sep 21 '17 at 16:50

2 Answers2

2

You also need to change configuration in AdminSecurityConfig.java to enable "/open_admin_style/img/**"

 @Override
    public void configure(WebSecurity web) throws Exception {
        web
            .ignoring()
            .antMatchers("/**/*.css")
            .antMatchers("/**/*.js")
            .antMatchers("/open_admin_style/img/") // <-------
            .antMatchers("/img/**")
            .antMatchers("/fonts/**")
            .antMatchers("/**/"+assetServerUrlPrefixInternal+"/**")
            .antMatchers("/favicon.ico")
            .antMatchers("/robots.txt");
    }
Konrad Borowski
  • 11,584
  • 3
  • 57
  • 71
0

The admin templates are packaged. Example, in my case, they are here:

C:\Users\myuser\.m2\repository\org\broadleafcommerce\broadleaf-open-admin-platform\5.2.0-SNAPSHOT\broadleaf-open-admin-platform-5.2.0-20170707.134303-195.jar!\open_admin_style

You will have to override the admin templates by following the same folder structure found in the directory I mentioned above, but replicated in your admin project under /src/resources.

For example, you can place your modified loginLayout.html here:

admin\src\main\resources\open_admin_style\templates\layout\

Your loginLayout.html could contain /img/admin/your-company-logo.png , and have the logo placed here:

admin\src\main\resources\open_admin_style\img\admin\your-company-logo.png

Edit: I might be wrong but it might be important to have similar file names in this simple overriding case.

JNate
  • 93
  • 1
  • 10
  • Thank you for the replay but how can i unpack the jar files presented on that location – Santosh Raju Sep 24 '17 at 13:20
  • You can use winrar or similar application to explore the content of the jar. – JNate Sep 25 '17 at 17:09
  • those files are shown in eclipse but not openable and editable i used de compiler to unzip but i have not find those folders i have seen in eclipse please help me – Santosh Raju Sep 28 '17 at 17:47
  • The files are not meant to be edited. If you have winrar, right-click open the jar. Navigate to the location of the file loginLayout.html in that jar. Then finally, drag and drop the file to Notepad to view its content. Copy-paste and modify the content to a new loginLayout.html (which will be placed at the location mentioned in my post). – JNate Sep 29 '17 at 08:04