# Menu
The menu for MAYS is configured through the table ay_menu of the database. This table can configure the menu and it's respective submenus.
id- it's the primary key of the table. Usually we multiply the schema_id * 10 to get the first level menu id.parent_id- indicates which menu is it's parent. Use this to create submenus. If this value is set the schema_id should be null.schema_id- the id of ay_schema that this menu uses.title- the text that appears on the UI on the menu item. it supports the use of a JSON object with translations (Check examples below)attributes- check belowtemplate- see explanation belowmenu_order- the order menu appears on the lefturlseo- if this menu item has a schema_id this must match the defined schema title in lowercaseactiveexternal_url- allows this menu item to link to a external url
# Attributes
The attributes field is a JSON field that supports the following keys:
icon - you can set an icon for the menu item. Check the possibilities here (opens new window). It's also possible to support other custom icons by converting them to base 64 (opens new window) and adding it to the custom CSS for MAYS TODO
See example
Set the attributes to {"icon":"pilhas"} and add the following code to the custom css
.icon-pilhas {
background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJlbGVtZW50b3NfZ3LDoWZpY29zX2JvdMO1ZXMiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDE5IDMzLjQzIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2ZmZjt9PC9zdHlsZT48L2RlZnM+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJtMy45NiwxMC44djE1Ljc4YzAsLjU0LjQ0Ljk4Ljk4Ljk4aDkuMTNjLjU0LDAsLjk4LS40NC45OC0uOTh2LTE1Ljc4YzAtLjU0LS40NC0uOTgtLjk4LS45OEg0LjkzYy0uNTQsMC0uOTguNDQtLjk4Ljk4aDBabTEuOTYsMTQuOHYtMS45OWg3LjE3djEuOTloLTcuMTdabTAtMy45NHYtMS45OWg3LjE3djEuOTloLTcuMTdabTAtMy45NHYtMS45OWg3LjE3djEuOTloLTcuMTdabTcuMTctNS45M3YxLjk5aC03LjE3di0xLjk5aDcuMTdaIi8+PHBhdGggY2xhc3M9ImNscy0xIiBkPSJtNC42MS45OHYyLjk3SDEuNjNjLS45LDAtMS42My43My0xLjYzLDEuNjN2MjYuMjJjMCwuOS43MywxLjYzLDEuNjMsMS42M2gxNS43NGMuOSwwLDEuNjMtLjczLDEuNjMtMS42M1Y1LjU4YzAtLjktLjczLTEuNjMtMS42My0xLjYzaC0yLjk4Vi45OGMwLS41NC0uNDQtLjk4LS45OC0uOThoLTcuODFjLS41NCwwLS45OC40NC0uOTguOThabTEyLjQzLDMwLjQ5SDEuOTZWNS45aDE1LjA4djI1LjU3Wk0xMi40MywxLjk2djEuOTloLTUuODV2LTEuOTloNS44NVoiLz48L3N2Zz4=);
}
# Templates
The template field defines which view is used on the menu item. Currently the following templates are available: