{"id":116,"date":"2019-08-31T06:47:23","date_gmt":"2019-08-31T06:47:23","guid":{"rendered":"https:\/\/docs.theironnetwork.org\/vuely\/?page_id=116"},"modified":"2019-10-19T06:59:17","modified_gmt":"2019-10-19T06:59:17","slug":"adding-menu-in-different-layouts","status":"publish","type":"page","link":"https:\/\/docs.theironnetwork.org\/vuely\/adding-menu-in-different-layouts\/","title":{"rendered":"Adding Menu In Different Layouts"},"content":{"rendered":"\n<h4 id=\"adding-a-new-menu-element\">Adding a new menu element<\/h4>\n\n\n\n<p>You can add new menu items in the <strong>Vuely<\/strong> template by adding the item you want, in the <code>src-&gt;store-&gt;modules-&gt;sidebar-&gt;data.js<\/code> file. The example of this is given below:  <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> export const menus = {<br>     'message.general': [<br>         {<br>             action: 'zmdi-view-dashboard', \/\/icon<br>             title: 'message.dashboard', \/\/ menu title<br>             active: true, \/\/ set active menu<br>             items: [<br>                 { title: 'message.ecommerce', path: '\/default\/dashboard\/ecommerce', exact: true },<br>                 { title: 'message.webAnalytics', path: '\/mini\/dashboard\/web-analytics', exact: true },<br>                 { title: 'message.magazine', path: '\/horizontal\/dashboard\/magazine', exact: true },<br>                 { title: 'message.news', path: '\/boxed-v2\/dashboard\/news', exact: true },<br>                 { title: 'message.agency', path: '\/boxed\/dashboard\/agency', exact: true },<br>                 { title: 'message.saas', path: '\/horizontal\/dashboard\/saas', exact: true }<br>             ] \/\/ childrens<br>         },<br>         {<br>             action: 'zmdi-widgets',<br>             title: 'message.widgets',<br>             active: false,<br>             items: [<br>                 { title: 'message.user', path: '\/widgets\/user-widgets' },<br>                 { title: 'message.charts', path: '\/widgets\/chart-widgets' }<br>             ]<br>         }<br>     ], \/\/ categories<br>     'message.modules': [<br>         {<br>             action: 'zmdi-email',<br>             title: 'message.inbox',<br>             active: false,<br>             items: null,<br>             path: '\/inbox'<br>         },<br>         {<br>             action: 'zmdi-comments',<br>             title: 'message.chat',<br>             active: false,<br>             items: null,<br>             path: '\/chat'<br>         }<br>     ]<br> }<\/pre>\n\n\n\n<h5 id=\"change-edit-icons-of-the-menu-items\">Change\/Edit icons of the menu items<\/h5>\n\n\n\n<p> You can change or edit the icons of the menu items by just changing the value of the <strong>action<\/strong> key in the above example. <\/p>\n\n\n\n<h5 id=\"change-edit-icons-of-the-parent-menu-items-in-horizontal-layout\">Change\/Edit icons of the parent menu items in Horizontal Layout<\/h5>\n\n\n\n<p>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 <code>src-&gt;components-&gt;AppHorizontalMenus.vue<\/code> file, and name the icons for each category as defined below:- <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> <br>export default {<br>  data() {<br>    return {<br>      categories: <br>        {<br>         'message.general': \"zmdi zmdi-view-dashboard\",<br>         'message.modules': \"zmdi zmdi-widgets\",<br>         'message.components':\"zmdi zmdi-view-carousel\",<br>         'message.applications': \"zmdi zmdi-assignment-check\",<br>         'message.features':\"zmdi zmdi-wrench\",<br>         'message.extensions':\"zmdi zmdi-file\"<br>       }<br>    }<br>  }<br>} <\/pre>\n\n\n\n<blockquote class=\"wp-block-quote blockquote-warning\"><p><strong>Note:<\/strong> Sub Menu(Child) items in the horizontal layout uses the same approach as other layouts are using. The above approach is only for the parent menu items not for the child menu items. <\/p><\/blockquote>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h4 id=\"adding-route-of-the-added-element-in-different-layouts\">Adding route of the added element in different layouts<\/h4>\n\n\n\n<h6 id=\"default-layout\">Default Layout<\/h6>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/08\/def-lay.png\"><img loading=\"lazy\" width=\"1024\" height=\"481\" src=\"https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/08\/def-lay-1024x481.png\" alt=\"\" class=\"wp-image-106\" srcset=\"https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/08\/def-lay-1024x481.png 1024w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/08\/def-lay-300x141.png 300w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/08\/def-lay-768x361.png 768w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/08\/def-lay-1568x737.png 1568w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/08\/def-lay.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>Default Layout<\/figcaption><\/figure>\n\n\n\n<p>You need to define the route of newly added element in the <code>src-&gt;router-&gt;default.js<\/code> file. You can add the element in the children array. You can find the example below: <\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import Full from 'Container\/Full'<br> <br>\/\/ dashboard components<br>const Ecommerce = () =&gt; import('Views\/dashboard\/Ecommerce');<br> <br>export default {<br>   path: '\/',<br>   component: Full,<br>   redirect: '\/default\/dashboard\/ecommerce',<br>   children: [<br>      {<br>         path: '\/default\/dashboard\/ecommerce',  \/\/ path<br>         component: Ecommerce,                  \/\/ component<br>         meta: {<br>            requiresAuth: true,                 \/\/ to protect page <br>            title: 'message.ecommerce',         \/\/ page title<br>            breadcrumb: 'Dashboard \/ Ecommerce' \/\/ page breadcrumbs<br>         }<br>      }<br>   ]<br>} <\/pre>\n\n\n\n<h5 id=\"mini-sidebar\">Mini Sidebar<\/h5>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/08\/min-sidebar.png\"><img loading=\"lazy\" width=\"1024\" height=\"481\" src=\"https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/08\/min-sidebar-1024x481.png\" alt=\"\" class=\"wp-image-108\" srcset=\"https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/08\/min-sidebar-1024x481.png 1024w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/08\/min-sidebar-300x141.png 300w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/08\/min-sidebar-768x361.png 768w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/08\/min-sidebar-1568x737.png 1568w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/08\/min-sidebar.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>Mini Sidebar<\/figcaption><\/figure>\n\n\n\n<p>You need to define the route of newly added element in the <code>src-&gt;router-&gt;mini.js<\/code> file. You can add the element in the children array. You can find the example below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import MiniSidebarLayout from 'Container\/MiniSidebarLayout'<br> <br>\/\/ dashboard components<br>const Ecommerce = () =&gt; import('Views\/dashboard\/Ecommerce');<br> <br>export default {<br>   path: '\/mini',<br>   component: MiniSidebarLayout,<br>   redirect: '\/mini\/dashboard\/ecommerce',<br>   children: [<br>      {<br>         component: Ecommerce,<br>         path: '\/mini\/dashboard\/ecommerce',<br>         meta: {<br>            requiresAuth: true,<br>            title: 'message.ecommerce',<br>            breadcrumb: 'Dashboard \/ Ecommerce'<br>         }<br>      }<br>   ]<br>}<\/pre>\n\n\n\n<h5>Horizontal Menu<\/h5>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/hrmenu.png\"><img loading=\"lazy\" width=\"1024\" height=\"482\" src=\"https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/hrmenu-1024x482.png\" alt=\"\" class=\"wp-image-154\" srcset=\"https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/hrmenu-1024x482.png 1024w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/hrmenu-300x141.png 300w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/hrmenu-768x361.png 768w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/hrmenu-1568x737.png 1568w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/hrmenu.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>Horizontal Menu<\/figcaption><\/figure>\n\n\n\n<p>You need to define the route of newly added element in the <code>src-&gt;router-&gt;horizontal.js<\/code> file. You can add the element in the children array. You can find the example below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import HorizontalLayout from 'Container\/HorizontalLayout'<br> <br>\/\/ dashboard components<br>const Ecommerce = () =&gt; import('Views\/dashboard\/Ecommerce');<br> <br>export default {<br>   path: '\/horizontal',<br>   component: HorizontalLayout,<br>   redirect: '\/horizontal\/dashboard\/ecommerce',<br>   children: [<br>      {<br>         component: Ecommerce,<br>         path: '\/horizontal\/dashboard\/ecommerce',<br>         meta: {<br>            requiresAuth: true,<br>            title: 'message.ecommerce',<br>            breadcrumb: 'Dashboard \/ Ecommerce'<br>         }<br>      }<br>   ]<br>}<\/pre>\n\n\n\n<h5>Boxed<\/h5>\n\n\n\n<p>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 &amp; the steps that needs to be followed to add new menu item in boxed versions.<\/p>\n\n\n\n<h5>Boxed Agency Version<\/h5>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/boxedimage.png\"><img loading=\"lazy\" width=\"1024\" height=\"481\" src=\"https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/boxedimage-1024x481.png\" alt=\"\" class=\"wp-image-155\" srcset=\"https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/boxedimage-1024x481.png 1024w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/boxedimage-300x141.png 300w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/boxedimage-768x361.png 768w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/boxedimage-1568x737.png 1568w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/boxedimage.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>Boxed Agency Version<\/figcaption><\/figure>\n\n\n\n<p>You need to define the route of newly added element in the <code>src-&gt;router-&gt;boxed.js<\/code> file. You can add the element in the children array. You can find the example below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import BoxedLayout from 'Container\/Boxed';<br> <br>\/\/ dashboard components<br>const Ecommerce = () =&gt; import('Views\/dashboard\/Ecommerce');<br> <br>export default {<br>   path: '\/boxed',<br>   component: BoxedLayout,<br>   redirect: '\/boxed\/dashboard\/ecommerce',<br>   children: [<br>      {<br>         component: Ecommerce,<br>         path: '\/boxed\/dashboard\/ecommerce',<br>         meta: {<br>            requiresAuth: true,<br>            title: 'message.ecommerce',<br>            breadcrumb: 'Dashboard \/ Ecommerce'<br>         }<br>      }<br>   ]<br>}<\/pre>\n\n\n\n<h5>Boxed News Version<\/h5>\n\n\n\n<figure class=\"wp-block-image\"><a href=\"https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/boxednews.png\"><img loading=\"lazy\" width=\"1024\" height=\"576\" src=\"https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/boxednews-1024x576.png\" alt=\"\" class=\"wp-image-156\" srcset=\"https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/boxednews-1024x576.png 1024w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/boxednews-300x169.png 300w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/boxednews-768x432.png 768w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/boxednews-1568x882.png 1568w, https:\/\/docs.theironnetwork.org\/vuely\/wp-content\/uploads\/sites\/2\/2019\/09\/boxednews.png 1920w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption>Boxed News Version<\/figcaption><\/figure>\n\n\n\n<p>You need to define the route of newly added element in the <code>src-&gt;router-&gt;boxed-v2.js<\/code> file. You can add the element in the children array. You can find the example below:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">import BoxedLayout from 'Container\/BoxedV2';<br> <br>\/\/ dashboard components<br>const Ecommerce = () =&gt; import('Views\/dashboard\/Ecommerce');<br> <br>export default {<br>   path: '\/boxed-v2',<br>   component: BoxedLayout,<br>   redirect: '\/boxed-v2\/dashboard\/ecommerce',<br>   children: [<br>      {<br>         component: Ecommerce,<br>         path: '\/boxed-v2\/dashboard\/ecommerce',<br>         meta: {<br>            requiresAuth: true,<br>            title: 'message.ecommerce',<br>            breadcrumb: null<br>         }<br>      }<br>   ]<br>}<\/pre>\n<div class=\"pld-like-dislike-wrap pld-template-1\">\n    <div class=\"pld-like-wrap  pld-common-wrap\">\n    <a href=\"javascript:void(0);\" class=\"pld-like-trigger pld-like-dislike-trigger \" title=\"\" data-post-id=\"116\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-ip-check=\"0\" data-user-check=\"1\">\n                        <i class=\"fas fa-thumbs-up\"><\/i>\n                    <\/a>\n    <span class=\"pld-like-count-wrap pld-count-wrap\">2    <\/span>\n<\/div><div class=\"pld-dislike-wrap  pld-common-wrap\">\n    <a href=\"javascript:void(0);\" class=\"pld-dislike-trigger pld-like-dislike-trigger \" title=\"\" data-post-id=\"116\" data-trigger-type=\"dislike\" data-ip-check=\"0\" data-restriction=\"cookie\" data-user-check=\"1\">\n                        <i class=\"fas fa-thumbs-down\"><\/i>\n                    <\/a>\n    <span class=\"pld-dislike-count-wrap pld-count-wrap\"><\/span>\n<\/div><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>Adding a new menu element You can add new menu items in the Vuely template by adding the item you want, in the src-&gt;store-&gt;modules-&gt;sidebar-&gt;data.js file. The example of this is given below: export const menus = { &#8216;message.general&#8217;: [ { action: &#8216;zmdi-view-dashboard&#8217;, \/\/icon title: &#8216;message.dashboard&#8217;, \/\/ menu title active: true, \/\/ set active menu items: [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":5,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/docs.theironnetwork.org\/vuely\/wp-json\/wp\/v2\/pages\/116"}],"collection":[{"href":"https:\/\/docs.theironnetwork.org\/vuely\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/docs.theironnetwork.org\/vuely\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/docs.theironnetwork.org\/vuely\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.theironnetwork.org\/vuely\/wp-json\/wp\/v2\/comments?post=116"}],"version-history":[{"count":16,"href":"https:\/\/docs.theironnetwork.org\/vuely\/wp-json\/wp\/v2\/pages\/116\/revisions"}],"predecessor-version":[{"id":821,"href":"https:\/\/docs.theironnetwork.org\/vuely\/wp-json\/wp\/v2\/pages\/116\/revisions\/821"}],"wp:attachment":[{"href":"https:\/\/docs.theironnetwork.org\/vuely\/wp-json\/wp\/v2\/media?parent=116"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}