Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| blocks:app-note:table [2026-10-07 13:43] – created admin | blocks:app-note:table [2026-10-13 08:20] (current) – Added table ill admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ======Table Block====== | ======Table Block====== | ||
| - | This application provides some examples on how the Table block can be used to separate content | + | This application provides some examples on how the Table block can be used to separate content |
| + | {{ : | ||
| ===== Installation ===== | ===== Installation ===== | ||
| You need a computer with a running blocks server and a web browser to use this application note. | You need a computer with a running blocks server and a web browser to use this application note. | ||
| Line 17: | Line 18: | ||
| Child Replication is a method by which you can create multiple slides, pages or other items based on a single child block and a data source. The single child block describes the structure of what to appear, while the actual content come from the data source. This is useful when you want to show many items that are structurally identical, differing only in the specific text, images, video or other content to appear in each item. The data can come from an external database, or – in this case – from a Table block. Separating the //form// from the //content// in this way makes it easier to maintain those aspects separately, or even to re-use content in different scenarios. | Child Replication is a method by which you can create multiple slides, pages or other items based on a single child block and a data source. The single child block describes the structure of what to appear, while the actual content come from the data source. This is useful when you want to show many items that are structurally identical, differing only in the specific text, images, video or other content to appear in each item. The data can come from an external database, or – in this case – from a Table block. Separating the //form// from the //content// in this way makes it easier to maintain those aspects separately, or even to re-use content in different scenarios. | ||
| - | Set up a display spot (either using PIXILAB Player or a separate browser window, as sugested | + | Set up a display spot (either using PIXILAB Player or a separate browser window, as suggested |
| Next, drag the Book block to the Lobby spot. This also uses Child Replication, | Next, drag the Book block to the Lobby spot. This also uses Child Replication, | ||
| ==== Constants ==== | ==== Constants ==== | ||
| - | A table can be used to hold text, images and other content used in multiple other places, allowing that content to be maintained in one central location rather than spread out across numerous blocks. The table named " | + | A table can be used to hold text, images and other content used in multiple other places, allowing that content to be maintained in one central location rather than spread out across numerous blocks. The table named " |
| + | Open the Symbols block to view the content. Any changes made there are immediately reflected on the display spot, since the spot’s “Auto-update on Block Change” setting is active. Open the Panel block to see how the table data is used by specifying the //Symbols// block as the “Constants Table” of the Panel block (note that you don’t have to specify the group name if the table is in the same group as the block using it). The various symbols are rendered using Media URL blocks with the URL pointed to the desired row and column in the table using a binding like this: | ||
| + | |||
| + | < | ||
| + | Local.constant.Happy.Icon | ||
| + | </ | ||
| + | |||
| + | For control labels, such as buttons, a simplified syntax is used, such as: | ||
| + | |||
| + | < | ||
| + | {Happy.Text} | ||
| + | </ | ||
| + | |||
| + | Referring to the row and column names in the associated Constants Table. | ||
| + | |||
| + | ==== Per-Spot Content Management ==== | ||
| + | This example uses a Table to manage different videos, images and texts appearing on a number of Display Spots. Each Spot plays a video followed by an image with a lower-third text, in a loop. It would be quite straightforward, | ||
| + | |||
| + | To try this out, make sure both the Lobby and Restaurant spots are connected (indicated by the circular reload button or a green Connected indicator), then drag the Slideshow block from the PerSpot group to both these spots. Notice how they work in a similar way, but displaying different content. Here, the content comes from different rows in the Content table block – one row per spot. Which row to render is specified by a Spot Parameter configured separately for each Spot. To see this, double-click the Spot then choose the Parameters tab. Both spots have a TableRow parameter, but with with different values specifying the desired table row. This parameter is then used in the bindings in the Slideshow block. For instance, the Video block is a Media URL bound to this property: | ||
| + | |||
| + | < | ||
| + | Local.constant[TableRow].Video | ||
| + | </ | ||
| + | |||
| + | Notice how the TableRow parameter is used to tailor the path based on the value of the TableRow spot parameter. | ||