<mc-navigation-link>

Last updated - April 23, 2024

This component is used to generate a link to a site page from another component (e.g. site header). This tag is equivalent of <router-link> tag of Vue router for Piston components.

This tag exposes three properties which we will understand in detail with the help of examples -

<mc-navigation-link 
   title=""
   uriPrefix=""
   mapping="" 
/>
  • title - This prop renders the label for the navigation link.

  • uriPrefix - This prop represents the uri of the parent node relative to the url of a MechCloud site.

  • mapping - This prop captures the mapping for this node.

Let's say you want to create a link to a first level site node with Administration as title and administration as mapping. You can generate a link to such a site node using following code -

<mc-navigation-link
   title="Administration"
   uriPrefix=""
   mapping="administration" 
/>

If Administration node is having a child node with Teams as title and mapping as teams then you can create a link for same using following code -

<mc-navigation-link
   title="Teams"
   uriPrefix="administration"
   mapping="teams" 
/>

If Teams node is having a child node with Users as title and mapping as users then you can create a link for same using following code -

<mc-navigation-link
   title="Users"
   uriPrefix="administration/teams"
   mapping="users" 
/>

Last updated