-
Notifications
You must be signed in to change notification settings - Fork 487
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Admin: Add CMS pages category Demo - refs BT#20999
- Loading branch information
Showing
4 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<template> | ||
<!-- List of pages of category "contact" --> | ||
<div class="container mx-auto flex gap-8"> | ||
<div v-if="pages.length" class="flex-1"> | ||
<PageCardList :pages="pages" class="grid gap-4 grid-cols-1" /> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
import { ref } from "vue"; | ||
import { useStore } from "vuex"; | ||
import { useI18n } from "vue-i18n"; | ||
import PageCardList from "../components/page/PageCardList"; | ||
const store = useStore(); | ||
const { locale } = useI18n(); | ||
const pages = ref([]); | ||
store | ||
.dispatch("page/findAll", { | ||
"category.title": "demo", | ||
enabled: "1", | ||
locale: locale.value, | ||
}) | ||
.then((response) => (pages.value = response)); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters