-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use costumer cases and add language field
- Loading branch information
1 parent
637dd41
commit 6cec3f5
Showing
2 changed files
with
11 additions
and
43 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 |
---|---|---|
@@ -1,54 +1,17 @@ | ||
import { i18n } from "languages"; | ||
import { | ||
StructureResolver, | ||
DefaultDocumentNodeResolver, | ||
} from "sanity/structure"; | ||
import { blogPostsID } from "studioShared/schemas/documents/blogPosts"; | ||
import { StructureResolver } from "sanity/structure"; | ||
import { customerCasesID } from "./schemas/documents/customerCases"; | ||
|
||
export const deskStructure: StructureResolver = (S) => | ||
S.list() | ||
.title("Content") | ||
.items([ | ||
S.listItem() | ||
.title("Blogposts sorted by base language") | ||
.title("Costumer cases") | ||
.child( | ||
S.documentTypeList(blogPostsID) | ||
.title("List of Blogposts") | ||
S.documentTypeList(customerCasesID) | ||
.title("Costumer cases") | ||
.filter("_type == $type && language == $lang") | ||
.params({ type: blogPostsID, lang: i18n.base }) | ||
.params({ type: customerCasesID, lang: i18n.base }) | ||
), | ||
S.listItem() | ||
.title("Blogposts sorted into language folders") | ||
.child( | ||
S.list() | ||
.title("Blogposts") | ||
.items([ | ||
S.listItem() | ||
.title("Blogposts (EN)") | ||
.child( | ||
S.documentTypeList(blogPostsID) | ||
.title("List of Blogposts (EN)") | ||
.filter("_type == $type && language == $lang") | ||
.params({ type: blogPostsID, lang: "en" }) | ||
), | ||
S.listItem() | ||
.title("Blogposts (NO)") | ||
.child( | ||
S.documentTypeList(blogPostsID) | ||
.title("List of Blogposts (NO)") | ||
.filter("_type == $type && language == $lang") | ||
.params({ type: blogPostsID, lang: "no" }) | ||
), | ||
S.listItem() | ||
.title("Blogposts (SE)") | ||
.child( | ||
S.documentTypeList(blogPostsID) | ||
.title("List of Blogposts (SE)") | ||
.filter("_type == $type && language == $lang") | ||
.params({ type: blogPostsID, lang: "se" }) | ||
), | ||
// Add more languages as needed | ||
]) | ||
), | ||
// Other items can be added here if needed | ||
]); |
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