Search:  

Creating an item list leading to item details

Presenting a list of items, where each item has a clickable link to another page, upon which more detail is shown about the item clicked on.

To create this structure you need the Form, in which the data is stored, two Queries, a Section and a Page.

Component naming

Whilst the names of the components are not critical, and should be adjusted to refer to the particular type of item being displayed, for this generic example the components names used are:

Form  Item
Query listing records Q: Items
Query formatting item details  Q: Item
Section on which Q: Items is embedded Items
Page* on which Q: Item is embedded Item Details

*This could work equally well as a Section. Read more


Component location

The location of the components in the site is not critical.

Typically, the Form will be located along with other forms in an area where the users responsible for maintaining the data will be working.

The Queries will not be edited after the setup is complete; so will best be located in a section for queries, where they will be 'out of the way'.

The Page "Item Details" is often set to be a child of the Section "Items", since the two are intimately related, and the Section itself is placed in the public-facing area of the site where is it wanted to be seen.

 

Component description

Form: Item

The Form is unremarkable, being simply a form containing multiple record, with two or more fields: a "Name" field, which will be shown in the list of Items, and other fields, for example a "Description" field, which will also be shown on the Item Details page.


Query: Q: Items

This query typically lists all the records in the Form, however the list can be refined in various ways:

  • The list can be sorted
    • alphabetically, or
    • numerically, if a numeric 'sequence' field is available in the form (for this, it is recommended that a Number field is used rather than an Integer field, so that you can insert items in an existing sequence with a fractional number without having to edit other records to 'move along' their sequence numbers).
  • The list can show any number of fields, including images
  • The list can be created using either a Table View or a Custom View
    • The Table View has the advantage of allowing every other row to be shown in a different style (say with alternating background colors)
    • The Custom View allows for more sophisticated layout
      One or more of the fields displayed in this query should be set to link to the "Item Details" Page (on which the Q: Items query will be embedded).

Section: Items

This is a Section component, onto which the Query "Q: Items" is embedded.
When embedding, you can refine the listing:

  • Criteria: when the query is embedded on the Section it can be restricted by explicit criteria to only show a subset of the available records
  • Paging: when the query is embedded on the Section it will default to show the list in pages of 10 – the quantity shown per page can be specified to any number between 1 and 100.


Query: Q: Item

This Query is used to display the detail of the item selected in the previous query. There is no restriction to the quantity and layout of the fields, and it would be normal to use a Custom View to take advantage of the layout flexibility this offers. (You could also use a Sale View component if the item was a product and you needed to provide ecommerce capability)


Page: Item Details

This is a Page component, onto which the Query "Q: Item" is embedded.

Note: When embedding, it is good practise to limit the number of records to 1. Normally the page will be called with parameters provided by the Q: Items query, which will limit the page to displaying only one record anyway, but limiting it to one explicitly ensures that the page looks normal (simply displaying the first record available) should it be mistakenly arrived at – for example whilst editing the site.

The Item Details page is often marked Hidden in the navigation, to prevent it being navigated to except via the Section.

 

 

 


 

Copyright © 2023 Enstar LLC    All rights reserved Print this pageTranslate: