Open kevinesaa opened 2 years ago
the final result of every menu should looks like this:
const MENU_EXAMPLE = {
item1:{refId:"", text:"", imageIcon: null, actionLink:{type:"internal", url:"/.."}},
group1:{
refId:"",
text:"",
imageIcon:{type:"external",url:""},
items:[
{refId:"", text:"", imageIcon:{type:"internal",url:""}, actionLink:{type:"internal", url:"/"}},
{refId:"", text:"", imageIcon:{type:"external",url:""}, actionLink:null},
]
}
};
loadInternalRoutesHelper
of the JsInternalRouteLoader
. const item = MENU_EXAMPLE.group1.items[1];
const obj = document.getElementById(item.refId ):
obj.innerHTML = item.text;
obj.onclick = function() {
//do something
};
Make a strategy for translate de text menu without remake all the JSON for each one language.
Make a strategy to extract menu texts' into R.COMMONS_STRINGS or R.MODULE_STRINGS
Make a strategy to extract menu refId's into R.COMMONS_REFERENCE_ID or R.MODULE_REFERENCE_ID
Make a strategy to extract menu internal url's into R.COMMONS_INTERNAL_ROUTES or R.MODULE_INTERNAL_ROUTES
Make a strategy to extract menu external url's into R.COMMONS_EXTERNAL_ROUTES or R.MODULE_EXTERNAL_ROUTES
Make a strategy to extract menu image url's into R.COMMONS_IMAGES or R.MODULE_IMAGES
Desing menu objects struture Make a folder with menus objects files