The Firebase Displayer Widget is an element that will be used to display a single record values
Individual fields (text, images, audio or video) are displayed by using the Widget Firebase Field that must be added to the UI inside a Firebase Displayer.
In order to add a Firebase Displayer to a page, just drop it from the Widget list and then add all the required Firebase Fields inside it.
Example of Firebase Displayer
Since the version 2.2, it is possible to implement different behaviours for the Firebase Displayer.
By double-clicking on the Firebase Displayer, you can access to its advanced properties:
By default, the Displayer is set to the “Load Data from Memory”, but with Thorium 2.2 you can now set the Displayer mode to the following values:
Load Data From Memory: The displayer is called from a Firebase Repeater line and will display the record information from the selected line. (It must be added to a page that is called from a Firebase Repeater and then automatically display record memory data.)
Load Record from UID: The Firebase Displayer can be added to any page, and will load a record from a given Collection and with a given fixed ID.
Load User Single Record: The displayer will load and display a record saved with a “Single Record Form”, the most obvious example is to load the user record from the collection “thorium.users” that contain current connected user information (name, profile image….)
Load the user record that owns the current record: like for Memory data, this mode can be implemented only in a Displayer that is called from a Firebase Repeater, it will load and display the data of the user who created the current record. It will load data from the collection “thorium.users” who created the current selected record. You can add fields from this collection inside the Displayer, such as: displayName, photoURL, email, lastSignInTime …. Or all the extra information you may have add to the user profiles.
Load Parent Record from Collection: like for Memory data, this mode can be implemented only in a Displayer that is called from a Firebase Repeater, it will load and display the parent record of a given collection. For example, if you display an order-line detail, then you can recall the Order Record oin order to display it on the page. It requires only one parameter: the name of the parent collection you want to recall.
Example: this page displays a user order with the order lines and at the top a Displayer shows the user who placed this order.