Skip to content
On this page

getCategoryRoute ​

Definition ​

Get category/navigation route information for Vue Router.

Returns category or navigation URL and route informations for resolving SEO url. Use it with combination of <RouterLink> or <NuxtLink> in Vue.js or Nuxt.js projects.

Example:

html
<RouterLink :to="getCategoryRoute(navigationElement)">

Signature ​

ts
export function getCategoryRoute<
  T extends {
    type: string;
    externalLink?: string;
    seoUrls?: { seoPathInfo: string }[];
    internalLink?: string;
    id: string;
    linkType?: string;
  },
>(category: T) 

Parameters ​

NameTypeDescription
category
T
getCategoryRoute has loaded