Implementing Page Navigation
Display a list of product data stored in Firestore and implement navigation to each product's detail page
Create a new app and set up a page to display product data
- Place a [Table] on the canvas.
- Click [Create New] in [Dataflows] and change the dataflow name to
listProducts. - Select
Onboarding Firebaseas the data source. - Choose
List documentsin [Action] and enterproductsin [Collection]. - Click [Run], and with the table selected, enter
{{ listProducts.data }}in [Data] of the [Inspect]. - Place a [Text] and enter
Product Listin the [Text] of the [Inspect].
Create a page to display product details and retrieve detailed information from a dataflow
- Click the menu at the top left of the editor, click [Create], and from the dropdown menu, click [Create Page].
- Enter
Product Details Pagein [Page name] and click [Create]. - Click [Add Event] in the [Inspect] of the [Table], and select the
Product Details Pagecreated earlier in [Page]. - Click [Add Parameter], enter
documentIdfor [Key], and{{ table1.selectedRow.data.meta.id }}for [Value]. - Click on any product data within the [Table] and navigate to the [Product Details Page].
- Click [Create] in [Dataflows] and change the dataflow name to
getProduct. - Select
Onboarding Firebaseas the data source. - Choose [Get document] in [Action] and enter
productsin [Collection]. - Enter
{{ querierUrlParams.value.documentId }}in [Document ID]. - Click [Run] and from [State] select the [getProduct] dataflow.
- Click the page name at the top left of the header, click the [Eye Icon] next to [Product Details Page], and set it to hidden from navigation.