Building Step by Step (2): Adding a Page

12002

1. Introduction to This Lesson

In this lesson, you will learn about the configuration of the _page table for displaying pages, understand the structure of this table, and the usage of each of its fields. You will practice configuring the _page table and observe the changes on the page.

2. Controlling Page Display through the _page Table

In projects generated by the Jianghu JS framework, multiple pages are included, and users can link to these pages through the menu bar. This functionality is achieved by configuring the "_page" table.

If an HTML file is not configured in the "_page" table, that page will not appear in the page menu, and users will not be able to open that page through the menu.

By opening the _page table in the jianghu-basic database, you can see that the pageId field contains the names of the front-end HTML files.

102-07-jianghujs-basic-database-page-table.png

When you open the project in a browser, the names of the pages corresponding to these HTML files will appear in the menu bar.

102-07-jianghujs-basic-page-menu.png

3. Structure and Function of the _page Table

Description of the functions of each field in the _page table:

| Field | Type | Description |
|