You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature allows to store the HTML content for static pages and show the links to these pages in specific sections of the user interface:
3
+
This function allows storing the HTML content of static pages and displaying links to these pages in specific sections of the user interface.
4
4
5
-
- The HTML content is stored in a new table of the GN's database.
5
+
To add new static pages go to **Admin Console** --> **Settings** --> **Static Pages** and select the **+ New Static Page** option, providing the following information:
6
6
7
-
- The link to pages can be showed in different points of the GN's GUI according to a list of "sections" associated to each page. In this PR is introduced the support to show the links for the top toolbar and the footer.
7
+
-**Language**: User interface language in which the static page will be displayed.
8
+
-**Page identifier**: A unique text identifier for the page.
9
+
-**Page label**: Label to display on the link.
10
+
-**Page icon**: (Optional) Icon to display next to the link label.
11
+
-**Format**: Format of the static page:
8
12
9
-
- Each page can be in 3 states:
13
+
-**Web link**: Link to a web page.
14
+
-**HTML content displayed embedded in the app**
15
+
-**HTML content displayed in a new browser tab**
16
+
-**Plain text content**
17
+
-**Email link**: Email address. Opens the system's mail client to send mail to the configured address.
10
18
11
-
-`HIDDEN`: visible to administrator.
12
-
-`PRIVATE`: visible to logged users.
13
-
-`PUBLIC`: visible to everyone.
19
+
-**Link**: Available for **Web link** / **Email link** formats.
14
20
15
-
- Pages can be added to different page sections. Currently the sections implemented are `TOP` (top menu of the main page) and `FOOTER` (footer of the main page).
21
+
- For **Web link** the link to a web page.
22
+
- For **Email link**, the email address to which the email will be sent.
16
23
17
-
- Only the administrator can edit the pages and see the pages in `HIDDEN` status.
24
+
-**Page content file**: For formats other than **Web link** or **Email link**, allows uploading a file with the HTML content / text to be displayed.
18
25
19
-
- The creation and the management of the content is done via the API.
26
+
-**Page content**: For formats other than **Web link** or **Email link**, allows editing the HTML / text content to display.
20
27
21
-

28
+
-**Page section**: Section of the page to display the link. Currently implemented sections are `TOP` (top menu of the main page) and `FOOTER` (footer of the main page).
22
29
23
-
Some restrictions:
24
-
25
-
- It is not possible to apply custom CSS to the page.
26
-
- Any external image must be loaded externally.
27
-
28
-
## Examples of API usage
29
-
30
-
Before executing the following examples, see [Example of CSRF call using curl](misc.md#example-csrf-curl) for details on the usage of the CSRF token (instead of the value `"X-XSRF-TOKEN: e934f557-17a3-47f2-8e6b-bdf1a3c90a97"` used in the examples) and cookies in the requests.
31
-
32
-
### Load a page in the top menu bar
33
-
34
-
In this example we're going to upload a file ``contactus.html`` and link it in the top menu:
35
-
36
-
1. Load the content by using the method POST `/api/pages/`, the mandatory fields are:
37
-
38
-
- language (3 letters like 'eng', 'ita', 'fra' \...)
39
-
- pageId (the identifier/link description of the page)
40
-
- format (must be LINK if a link is associated to the page)
41
-
- the content: data (a file with the page content) or a link (URL to another page). Define both is not possible.
At this point the page is created but not visible because is in status HIDDEN and is not loaded explicitly in any section of the page, except DRAFT that is not visible (in the future could be added to a page with an editor interface). Similar requests should be donefor each UI language supported.
48
-
49
-
2. To associate the link to the top bar is necessary to use the method POST `/api/pages/{language}/{pageId}/{section}` with the `TOP` value for the section.
30
+
-**Status**: Defines which users can see the link.
2. To associate the link to the footer is necessary to use the method POST `/api/pages/{language}/{pageId}/{section}` with the `FOOTER` value for the section.
The status of the page can be changed with the method PUT `/api/pages/{language}/{pageId}/{status}` where status could assume these values:
43
+
Some restrictions:
82
44
83
-
- `PUBLIC` - Visible to every user
84
-
- `PUBLIC_ONLY` - Visible to not logged users
85
-
- `PRIVATE` - Visible to logged users
86
-
- `HIDDEN` - Hidden to anyone
45
+
- It is not possible to apply custom CSS to the page.
46
+
- Any external image must be loaded externally.
87
47
88
-
Other methods in the API are to change/delete a page and to GET the list of the pages or the info of a specific one.
48
+
## Change the menu order in the top toolbar
89
49
90
-
### Change the menu order in the top toolbar
50
+
In the top bar, pages can be inserted between the default menu of the catalogue. This can be configured in **Admin Console** --> **Settings** --> **User interface**, in the **Header custom menu items** section.
91
51
92
-
Pages can be inserted in between catalogue default menu which are:
52
+
By default, the order of the items in the top bar is as follows:
93
53
94
54
```json
95
55
["gn-site-name-menu",
@@ -100,7 +60,7 @@ Pages can be inserted in between catalogue default menu which are:
100
60
"gn-admin-menu"]
101
61
```
102
62
103
-
Insert a page as a simple menu using its id or as a submenu using an object:
63
+
Insert a page as a simple menu using the page identifier or as a submenu using an object:
104
64
105
65
```json
106
66
["gn-site-name-menu",
@@ -115,3 +75,8 @@ Insert a page as a simple menu using its id or as a submenu using an object:
115
75
"gn-admin-menu",
116
76
"documentation"]
117
77
```
78
+
79
+
## Change the static pages order in the footer
80
+
81
+
The order of the footer pages can be configured in **Admin Console** --> **Settings** --> **User interface**, in the **Footer custom menu items** section.
0 commit comments