neatComponents is the hybrid-cloud database engine that powers clearString. | ||
Previous page | Techniques & KB Articles | Next page |
Creating an item list leading to item details |
Creating an item list leading to item detailsPresenting 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:
*This could work equally well as a Section. Read more
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.
This query typically lists all the records in the Form, however the list can be refined in various ways:
Section: Items This is a Section component, onto which the Query "Q: Items" is embedded.
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)
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.
|
|