Table of Contents
Working with Pages
Updated
by Ro Chittick
What are Pages?
Knack uses pages and views to build your live app. A view is a visual element like a form, grid, or search that works with records in your database. A page is used to group multiple views into one web page.
Your Live App can have multiple pages that your users can navigate with menus and links.
Where Do I Access Pages?
In the Builder, you can access your pages by clicking on the large Pages tab in the left column of the page. All of your pages are listed in the page tree on the left side of the page. You can click on any page in your list to see existing views, add new views and update the settings for both the page and the views listed on the page.
Here is an example page tree from the Inventory Manager template app:
Page Types
There are different types of pages with their own set of capabilities and uses.
- Start Page: A starting point into your app. A start page can be either a parent page or a standalone page.
- Parent Page: A page that has other pages (child pages) that it links to.
- Child Page: A page which is linked to by another page. It can never be a standalone page.
- Login Page: A page with a login view that password protects its child pages by requiring a user to login.
- Detail Page: A page which knows about a single record in your app. This page will show a details view of individual records and is often linked to by grid, list and search views.
- Single Record Page: Any child page that knows about a single record and will display Details Views, Edit Forms, or connected records.
- User Page: A user page is designed to handle administrative user tasks. User pages are not included in the Page Menu. Instead, they are included in their own User Menu. For more on user pages, click here.
Manage Pages
Add a Page
You can add a page by clicking the green “+” button next to the All Pages label on the left side of the page:
Edit a Page
Pages can be edited by clicking on the ellipses next to the pages name and selecting ‘Settings’ from the dropdown menu:
Copy and Link to an Existing Page
If you start to work with many pages in your Live App, you can save some time by copying pages or reusing the same pages by adding links to existing pages.
Copy a Page
You can copy any of the start pages in your page tree. Find the start page you want to copy and use the “settings” icon to access the “Copy” option:
Click “Copy” and your new page will be immediately copied and accessible in your Live App. All views and child pages will also be copied.
Link to an Existing Page
Any child page can be reused by other views that are displaying records from the same grid. This is particularly useful if you have complex detail layouts or forms and you don’t want to set it up again.
For example, when adding new columns to a grid, you can click on the “Actions” tab then select "Link to another page." You can then choose from any other child pages to connect to:
A new link will be added to the grid which will route to an existing page in your app. Adding these links to your grid or other views does not copy these pages, only links to them. So editing the original page that is linked to will affect any views that have been linked to that page.
Collapse/Expand Pages
If your page tree becomes too big to fit neatly on your monitor, the start pages will collapse to only show your currently selected page. You can click on the small grey arrows to the left of the collapsed start page’s name to show all the child pages listed beneath that start page:
Delete a Page
You can delete a page by clicking the ellipses next to the page’s name and selecting the “Delete” option from the dropdown. You'll be asked to confirm the delete:
When you delete a page/view and another view is using it via link to an existing page, the linked child page will be moved to the other view instead, becoming its new parent. Click here for more information.
Build a Page
Add a Start Page
Your Live App will always have at least one start page.
In the example below, the Live App contains three start pages: one for Current Inventory, one for Incoming Purchases and one for Outgoing Orders:
The first time you visit the Pages section, you'll be prompted to create your first start page:
You can add as many additional start pages as you need by clicking the “+ADD" button in the left column:
This brings up a new window that will guide you through adding your page.
Start pages are independent of any other page in your app. This means that when adding a view using the view menu on a start page, you'll be able to add a view for any of the tables in your database.
Start pages can add links to the page menu and can also be embedded as independent apps.
Add a Child Page
A child page is created from a link on a parent page. It can’t exist as a standalone page.
Your users can navigate to different child pages by clicking on links and menus in each view. For example:
- a menu can display links to one or more child pages.
- a grid or list can link to a child page to show more details about each record displayed.
- a details view can link to a child page to edit the same record, or insert child records.
You can view child pages by clicking on the page in the page tree or from the links below each view:
In this example, the View Purchase Details page is a child of the Incoming Purchases page.
You'll often add child pages automatically when adding pages and views through the Quick Start wizard. For example, if you are adding a grid view, you'll have options for adding child pages:
Page Settings
You can customize other options for a page by clicking on the ellipses next to the page’s name, then selecting ‘Settings’ from the dropdown:
This will open the Page settings menu:
Name
The page name will display in menus and links throughout your Live App.
Page URL
Knack builds a URL for each page by including what you add here, as well as some record identifiers when necessary.
The Page URL follows the app name, so the URL to access the Companies page is:
Every view linking to this page will be automatically updated to use this new URL.
Page Menu
By default, every start page you add is automatically included in the Page Menu. If you’d like to remove a specific page from the menu, uncheck the box labeled "Display the Page Menu when viewing this page."
A page with no page menu looks like this:
The Contact Directory template starts with three start pages. Here we exclude the Companies page from the page menu, but we still display a link for it. When viewing the Companies page in the Live App, we’ll see a menu with only two links:
Icon
Every start page can have an individual icon next to its name to represent it. Click the “add icon” link to select your icon. It will then display in the page menu:
Show a link to print this page
You can add a print link to your live app pages that will display in the upper right section of the app:
Clicking that print link will send a printer friendly version of that page to the browser's print function.
Display page in a modal popup
Enabling this option will cause your entire page to render in a modal popup. This is great for scenarios where you want to view/modify records, but not have to open an entire new page to do so:
Pages & User Logins
If you have different roles enabled for your Live App, you can control login access to each page individually. By adding a user login to your page, a user must login before they see any of the views on that page.
Click here for more information on adding or managing login access for pages.
Page Rules
Page rules are actions that can be automatically triggered based on conditions you define as soon as a user enters a page. For example, let's say your users can register for a specific event with limited availability. A page rule can be defined to hide the registration form when availability reaches zero.
Click here for more information on setting up page rules.
Notes & Troubleshooting
When you delete a page/view and another view is using it via link to an existing page, the linked child page will be moved to the other view instead, becoming its new parent. Click here for more information.