このページのトップへ
参考文献

参考文献

コレクション間をつなぐ複数レベルのマルチ参照フィールドを扱う

中級.png

中級

5K

出版された:

April 5, 2021

酒を楽しむ少女

によって

アンカー 1
開発者を雇う

説明例

In this example we demonstrate how to connect multiple collections (Faculties, Classes & Lessons) using multi-reference fields. Each faculty has multiple classes associated with it, and each class has multiple lessons associated with it.


The connections between the collections are displayed on different pages: the user can choose a faculty and see which classes this faculty includes. Then he can choose a class and see the different lessons the class has to offer.

コード例

タブ1

.

タブ2

.

タブ3

.

このコードによる解決は複雑になる可能性がある。

どのように構築したか


コレクション


We added 3 collections to our site:


  • Faculties: Includes the various faculties and information on each faculty. Each row in the collection includes a multi-reference field called 'classes' that includes the classes associated with the faculty.


  • Classes: Includes the various classes and information on each class. Each row in the collection includes a multi-reference field called 'lessons' that includes the lessons associated with the class.


  • Lessons: Includes the various lessons and information on each lesson.



Backend Code


We added a web module called DBFunctions.jsw that handles all the requests from the different collections: getting the faculty, class, and lesson data. From a security perspective it is advised to interact with your collections using backend code.



ページコード


The site includes the following pages:


  • Home page: Displays a repeater with all faculties and some information about each faculty.


  • Faculties dynamic page: Displays information about a specific faculty and a repeater with the classes associated with the faculty. The page also stores its URL in the session memory in order to return to this specific page when clicking the back button in the Classes dynamic page.


  • Classes dynamic page: Displays information for a specific class and the lessons assosiated with the class. The page gives the site visitor the ability to navigate through all class lessons by clicking the next & previous arrow buttons. It also includes a button to go back to the Faculty dynamic page while still preserving the chosen faculty. It does that by reading the session memory before navigating to the correct page.


  • Lessons dynamic page: Displays all the information related to a specific lesson. It also includes a button to go back to the class dynamic page while still preserving the chosen class. It does so by storing the current lesson ID in the session memory. Then in the classes page we read the session memory in order to display the correct lesson.

使用したAPI

コード以外の例。

コード以外の例。

コード以外の例。

コード以外の例。

コード以外の例。

コード以外の例。

関連記事

記事リンク

開発者を雇う

Veloソリューションは強力なツールですが、自力で構築するのは困難です。経験豊富なVelo開発会社に構築をお任せください。

関連例

これは役に立ったか?

はい

|

いいえ

ご意見ありがとう!

Mega Search

Mega Search

Filter a repeater using multiple input components.

中級.png

上級

データベース検索

データベース検索

訪問者に素早くサイトのコンテンツを検索してもらう。

中級.png

中級

To Do List

To Do List

Keep track of your tasks with a To Do List

中級.png

中級

アンカー2
ページ下