Page 1 of 1

How to change menus in admin

Posted: Thu Nov 27, 2014 2:46 am
by songdragon
I would like to change navigations in admin to other languages.

I changed SQL as following

Code: Select all

INSERT INTO BLC_ADMIN_MODULE (ADMIN_MODULE_ID, NAME, MODULE_KEY, ICON, DISPLAY_ORDER) VALUES (-1,'catalog test','BLCMerchandising', 'icon-barcode', 100);


But after the database changed, the navigations in web page is still 'catalog', not 'catalog test'.

I found that in leftNav.html there is a snippet of code like

Code: Select all

[[#{${module.moduleKey}}]]
.
I think it means that display MODULE_KEY in database, but in database it is 'BLCMerchandising'. :shock: :shock:

Why does this happen? And what shoud I change to modify navigations in admin web pages?

Re: How to change menus in admin

Posted: Tue Dec 02, 2014 7:58 pm
by phillipuniverse

Code: Select all

[[#{${module.moduleKey}}]]


is a Thymeleaf expression the says "translate the value of running the expression ${module.moduleKey} via Spring message bundles. So the result of ${module.moduleKey} is, in this case, 'BLCMerchandising'. Thymeleaf then effectively parses #{'BLCMerchandising'} which means that there is some message bundle that has a mapping for that in the admin. Specifically: https://github.com/BroadleafCommerce/Br ... rties#L198.

In your case, just change the BLCMErchandising test from MODULE_KEY to 'catalog test'. If the key is not found in the message bundle then it will just output the non-translated value.