Adding Menu In Different Layouts

Vuely provides you the ability to add new elements in the menu section of each layout. You can read the detailed documentation about adding the elements below.

Adding a new menu element

You can add new menu items in the Vuely template by adding the item you want, in the src->store->modules->sidebar->data.js file. The example of this is given below:

data.js
export const menus = {
	'message.general': [
		{
			action: 'zmdi-view-dashboard', //icon
			title: 'message.dashboard', // menu title
			active: true, // set active menu
			items: [
				{ title: 'message.ecommerce', path: '/default/dashboard/ecommerce', exact: true },
				{ title: 'message.webAnalytics', path: '/mini/dashboard/web-analytics', exact: true },
				{ title: 'message.magazine', path: '/horizontal/dashboard/magazine', exact: true },
				{ title: 'message.news', path: '/boxed-v2/dashboard/news', exact: true },
				{ title: 'message.agency', path: '/boxed/dashboard/agency', exact: true },
				{ title: 'message.saas', path: '/horizontal/dashboard/saas', exact: true }
			] // childrens
		},
		{
			action: 'zmdi-widgets',
			title: 'message.widgets',
			active: false,
			items: [
				{ title: 'message.user', path: '/widgets/user-widgets' },
				{ title: 'message.charts', path: '/widgets/chart-widgets' }
			]
		}
	], // categories
	'message.modules': [
		{
			action: 'zmdi-email',
			title: 'message.inbox',
			active: false,
			items: null,
			path: '/inbox'
		},
		{
			action: 'zmdi-comments',
			title: 'message.chat',
			active: false,
			items: null,
			path: '/chat'
		}
	]
}

Change/Edit icons of the menu items

You can change or edit the icons of the menu items by just changing the value of the action key in the above example.

Change/Edit icons of the parent menu items in Horizontal Layout

All the other layouts use the above mentioned method for the icons but the parent menu items in the horizontal layout uses some different approach. To add icons for parent menu items in horizontal layout open src->components->AppHorizontalMenus.vue file, and name the icons for each category as defined below:-

Adding route of the added element in different layouts

Default Layout

Default Layout

You need to define the route of newly added element in the src->router->default.js file. You can add the element in the children array. You can find the example below:

Mini Sidebar

Mini Sidebar

You need to define the route of newly added element in the src->router->mini.js file. You can add the element in the children array. You can find the example below:

Horizontal Menu

Horizontal Menu

You need to define the route of newly added element in the src->router->horizontal.js file. You can add the element in the children array. You can find the example below:

Boxed

There are two versions for boxed layout: One is Boxed Agency Version, another is Boxed News Version. Below are the screenshots for both the boxed versions & the steps that needs to be followed to add new menu item in boxed versions.

Boxed Agency Version

Boxed Agency Version

You need to define the route of newly added element in the src->router->boxed.js file. You can add the element in the children array. You can find the example below:

Boxed News Version

Boxed News Version

You need to define the route of newly added element in the src->router->boxed-v2.js file. You can add the element in the children array. You can find the example below:

Last updated