summaryrefslogtreecommitdiff
path: root/examples/index.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-03-02 18:38:12 +0100
committerJules Laplace <julescarbon@gmail.com>2021-03-02 18:38:30 +0100
commiteed359e2b6d35fe444353f115237d41d6acad9dc (patch)
tree5e90cb767cf7e87555890318e7f103d9e78cf568 /examples/index.js
parentee364381107827718c90fa359055be8e525fe386 (diff)
improving display options to the admin view
Diffstat (limited to 'examples/index.js')
-rw-r--r--examples/index.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/examples/index.js b/examples/index.js
index 57bd600..a2a1a18 100644
--- a/examples/index.js
+++ b/examples/index.js
@@ -29,6 +29,9 @@ var app = okcms
bread: {
title: "type",
},
+ artwork: {
+ groupBy: "artist",
+ },
},
},
},
@@ -77,6 +80,15 @@ var app = okcms
title: { type: "string" },
file: { type: "file" },
},
+ artist: {
+ id: { type: "string", hidden: true },
+ title: { type: "string", alias: "Artist Name" },
+ },
+ artwork: {
+ id: { type: "string", hidden: true },
+ title: { type: "string" },
+ artist: { type: "foreign-key", key: "artist" },
+ },
},
resources: [
@@ -86,6 +98,8 @@ var app = okcms
{ type: "test" },
{ type: "flour" },
{ type: "filez" },
+ { type: "artist" },
+ { type: "artwork" },
],
services: {