ToolJet/docs/versioned_docs/version-2.33.0/tutorial/pages.md

231 lines
7.6 KiB
Markdown
Raw Normal View History

Release: Community changes (v2.34.0) (#9226) * add custom resolvers info and editable row selection info (#9057) * fix system requirements icon * add auth info for webhooks and fix casing * add regex custom validation info (#9068) * [docs]: Marketplace 1.7 updates (#9085) * [docs] Amazon redshift plugin * make minor improvements * add and update docs for marketplace 1.7 * update order of plugins in overview to match sidebar * create new version --------- Co-authored-by: Shubhendra <withshubh@gmail.com> * add the latest version in the versions.json file (#9094) * [docs]: Update PDF component (#9088) * update PDF component * merged with develop and added changes to the new version * update docs favicon: (#9118) * [docs] SSO revamp (#9031) * add method to set default language * update image settings through custom css and update screenshots for getting started and tooljet concepts (#9158) * fix read documentation button * fix formatting for setup icons (#9172) * fix sidebar link for aws lambda * Update static media (#9175) * updated the screenshots * reduced the gif size * reverted the package.json file * edited the zoomed in images and replaced some gifs with screenshots * removed one gif * update static media * update file names * update toolbar * fix file names * fix: dynamodb img path * update media for org management dashboard * fix: casing and formatting * update workspace constant media * update media in workspace settings and github * update github sso * minor change to github sso docs * minor fix * update google sso * change includeCurrentVersion flag to false --------- Co-authored-by: Asjad Ahmed Khan <iitasjad2001@gmail.com> Co-authored-by: Asjad Ahmed Khan <60435499+2001asjad@users.noreply.github.com> Co-authored-by: Karan Rathod <karan.altcampus@gmail.com> * Feature: Engagespot plugin (#9012) * feat(plugins): added engagespot plugin * feat(docs): added engagespot plugin docs * chore(engagespot-plugin): revised copywritings * Feature: Databricks data source (#9174) * plugin-created * Databricks integration * icon, error handling * removed unrelated changes from marketplace and frontend package-lock.json removed runAsync and maxRows timeouts pending * timeout implementation * socket timeout and error handling * resolve comments * resolve comments2 * solved render issue test connection improvements * solved undefined error * fix TJDB not null value fail for is operation (#9055) * fix TJDB not null value fail for is operation * handling not null and null case insenstive values * Support for marketplace plugin deploy on render preview app (#9221) * Fix for marketplace error on render preview app * add marketplace build command * Adding new workflow for building marketplace plugin * removed render app creation * [:docs] Add documentation for Databricks plugin (#9224) * add docs for databricks * update databricks docs * update docs * remove ref to clusters * bump to v2.34.0 * Fixed data source cypress failure (#9227) * updated spec with required text * updated mongodb and import spec * updated import spec --------- Co-authored-by: Karan Rathod <karan.altcampus@gmail.com> Co-authored-by: Adish M <44204658+adishM98@users.noreply.github.com> Co-authored-by: Midhun G S <gsmithun4@gmail.com> Co-authored-by: Shubhendra <withshubh@gmail.com> Co-authored-by: Aman Regu <amanregu@gmail.com> Co-authored-by: Asjad Ahmed Khan <iitasjad2001@gmail.com> Co-authored-by: Asjad Ahmed Khan <60435499+2001asjad@users.noreply.github.com> Co-authored-by: Jobin Jose <129726530+jobin-logidots@users.noreply.github.com> Co-authored-by: Syed Mohammad Akhtar Rizvi <85864291+ShazanRizvi@users.noreply.github.com> Co-authored-by: blank0537 <111295371+blank0537@users.noreply.github.com> Co-authored-by: Mekhla Asopa <59684099+Mekhla-Asopa@users.noreply.github.com>
2024-03-29 13:43:26 +00:00
---
id: pages
title: Pages
---
Pages allows you to have multiple pages in a single application, making your ToolJet applications more robust and user-friendly.
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/pages.gif" alt="Multi-page app" />
</div>
## Pages Panel
You can open the **Pages Panel** by clicking on the **Pages** icon on the left sidebar of the app-builder.
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/pages-panel2.png" alt="Pages Panel"/>
</div>
## Panel Options
- **[Add Page](#add-page)**
- **[Settings](#settings)**
- **[Pin](#pin)**
- **[Search](#search)**
### Add Page
On the header of the Pages Manager, the **+** button that allows you to add more pages to your application
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/add2.png" alt="Pages Panel" width="400" />
</div>
On clicking the **+** button, a new page will be added, enter the name for the page and press enter.
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/newpage2.png" alt="Pages Panel" width="400" />
</div>
### Settings
From **Settings**, you can hide the **page navigation sidebar** in viewer mode, by enabling the **Disable Menu** option.
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/settings.png" alt="Pages Panel" width="400" />
</div>
### Pin
You can pin the pages panel from the **Pin** button and the panel won't close until you **unpin** it.
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/pin2.png" alt="Pages Panel" width="400" />
</div>
### Search
If there are many pages on the panel then you can use the **Search bar** to look for specific page.
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/search2.png" alt="Pages Panel" width="400" />
</div>
## Page options
There are several options available for a Page. To use these options, click on the kebab menu on the right of the page card.
- **[Page Handle](#page-handle)**
- **[Rename](#rename)**
- **[Mark Home](#mark-home)**
- **[Hide Page on app menu](#hide-page-on-app-menu)**
- **[Duplicate](#duplicate)**
- **[Event Handlers](#event-handlers)**
- **[Disable Page](#disable-page)**
- **[Delete Page](#delete-page)**
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/options.png" alt="Pages Panel" width="300" />
</div>
### Page Handle
Page Handle is the slug that is added at the end of the application URL. Page Handle get its default value when the page name is entered on the creation of the page. You can change the Page Handle from this option.
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/page-handle.png" alt="Pages Panel" width="300" />
</div>
### Rename
Rename option will allow you to rename the page.
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/rename.png" alt="Pages Panel" width="300" />
</div>
### Mark Home
Mark home option can be used to make a page the default landing page of the application, so whenever the app will be loaded the page that is marked home will be loaded.
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/mark-home.png" alt="Pages Panel" width="300" />
</div>
:::info
The page which is marked home will have a **Home** icon on the left of the Page Card.
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/home-icon.png" alt="Pages Panel" width="300" />
</div>
:::
### Hide Page on app menu
Hide Page option can be used to hide a page from the **page navigation sidebar** in viewer mode.
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/hide.png" alt="Pages Panel" width="300" />
</div>
:::info
If a page is hidden then you'll see an **eye** icon on the right of the card.
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/hide-icon.png" alt="Pages Panel" width="300" />
</div>
:::
You can go to the options again and **unhide** the app from the **page navigation sidebar**
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/unhide.png" alt="Pages Panel" width="300" />
</div>
:::info
After hiding a page, although the page may not appear in the pages navigation sidebar, it can still be accessed by utilizing either the **switch page action** or the **page URL**.
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/accesshidden.gif" alt="Pages Panel" />
</div>
:::
### Duplicate
The duplicate page option allows you to create and add a copy of the page in the pages list. The duplicated page will be an exact replica of the original page.
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/duplinew.png" alt="Pages Panel" width="300" />
</div>
### Event Handlers
Just like other Event Handlers on ToolJet, you can add event handlers too pages too.
Currently, there is **On page load** event available. You can use all the available actions for this event along with the new actions added specifically for the pages:
- **[switch page](/docs/actions/switch-page)**
- **[set page variable](/docs/actions/set-page-variable)**
- **[unset page variable](/docs/actions/unset-page-variable)**
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/event.png" alt="Pages Panel" width="300" />
</div>
### Disable Page
Disable page option can be used to disable a page. A disabled page won't be accessible in the viewer mode.
**Note:** Page marked as **home** can't be disabled.
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/disable.png" alt="Pages Panel" width="300" />
</div>
### Delete Page
You can **delete** a page from an application using this option.
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/delete.png" alt="Pages Panel" width="300" />
</div>
:::info
If a page is **Marked Home** then you won't be able to delete and the delete page option will be disabled.
<div style={{textAlign: 'center'}}>
<img className="screenshot-full" src="/img/v2-beta/pages/delete-disable.png" alt="Pages Panel" width="300" />
</div>
:::
## Exposed variables
| Variable | Description |
| ----------- | ----------- |
| `handle` | The `handle` represents the slug of the `page` within an app. In the URL `https://app.tooljet.com/applications/crm2/home`, `crm2` refers to the app name, and `home` corresponds to the handle. The handle is automatically set when a page is added, and you can also [rename](/docs/tutorial/pages#page-handle) the `handle` from the Page options. To access the value of the `handle` variable dynamically, use **`{{page.handle}}`**|
| `name` | The `name` indicates the name of the page set during its creation. To access the value of the `name` variable dynamically, use **`{{page.name}}`** |
| `id` | Each page in the ToolJet app receives a unique identifier upon creation. To access the value of the `id` dynamically, use **`{{page.id}}`** |
| `variables` | `variables` is an object that contains all the variables created for a specific page using the **[Set Page variable](/docs/actions/set-page-variable)** action. The value of a specific variable can be accessed dynamically using **`{{page.variables.<pagevariablename>}}`**, where `<pagevariablename>` refers to the variable created for that page using the Set Page variable action. |