Add topic slug to route params
This commit is contained in:
parent
2e4255260b
commit
a7141c3ea0
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<nav class="top-navigation">
|
<nav class="top-navigation">
|
||||||
<router-link to="/book/topic" active-class="top-navigation__link--active" class="top-navigation__link">Inhalte</router-link>
|
<router-link to="/book/topic/geld-und-kauf" active-class="top-navigation__link--active" class="top-navigation__link">Inhalte</router-link>
|
||||||
<router-link to="/rooms" active-class="top-navigation__link--active" class="top-navigation__link">Räume</router-link>
|
<router-link to="/rooms" active-class="top-navigation__link--active" class="top-navigation__link">Räume</router-link>
|
||||||
<router-link to="/404" active-class="top-navigation__link--active" class="top-navigation__link">Portfolio</router-link>
|
<router-link to="/404" active-class="top-navigation__link--active" class="top-navigation__link">Portfolio</router-link>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
class="start-sections__section"
|
class="start-sections__section"
|
||||||
title="Inhalte"
|
title="Inhalte"
|
||||||
subtitle="Lernen"
|
subtitle="Lernen"
|
||||||
route="/book/topic"
|
route="/book/topic/geld-und-kauf"
|
||||||
></section-block>
|
></section-block>
|
||||||
<section-block
|
<section-block
|
||||||
class="start-sections__section"
|
class="start-sections__section"
|
||||||
|
|
|
||||||
|
|
@ -20,13 +20,15 @@
|
||||||
},
|
},
|
||||||
|
|
||||||
apollo: {
|
apollo: {
|
||||||
topic: {
|
topic() {
|
||||||
query: TOPIC_QUERY,
|
return {
|
||||||
variables: {
|
query: TOPIC_QUERY,
|
||||||
slug: 'geld-und-kauf'
|
variables: {
|
||||||
},
|
slug: this.$route.params.topicSlug
|
||||||
update(data) {
|
},
|
||||||
return this.$getRidOfEdges(data).topic || {};
|
update(data) {
|
||||||
|
return this.$getRidOfEdges(data).topic || {};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ const routes = [
|
||||||
name: 'book',
|
name: 'book',
|
||||||
component: book,
|
component: book,
|
||||||
children: [
|
children: [
|
||||||
{path: 'topic', component: topic}
|
{path: 'topic/:topicSlug', component: topic}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{path: '*', component: p404}
|
{path: '*', component: p404}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue