Populate Tables

"It's still web development, it's just way easier!"

You can build html tables directly within any content, but what if you want a table that uses dynamic data? Wrival makes building tables that reuse other objects easy. This page does not cover all of the table functions, but it shows off a few of the basic ones. To demonstrate some of the different ways to use Wrival's table function let's start with a Database object named "ForSale".

Example:

<#ForSale:table>

Result:

Key Description Price
123 Short sleave shirt 19.95
124 Long sleave shirt 24.95

Full Table with Table Attributes

Convert the tabbed database table to an html table and provide the table tag with attributes.

Example:

<#ForSale:table='style="border: 1px solid;"'>

Result:

Key Description Price
123 Short sleave shirt 19.95
124 Long sleave shirt 24.95

Rearrange Headers

Example:

<#ForSale:headers="Price,Description,Key",table>

Result:

Price Description Key
19.95 Short sleave shirt 123
24.95 Long sleave shirt 124

Use Only Certain Headers

Example:

<#ForSale:headers="Key,Price",table>

Result:

Key Price
123 19.95
124 24.95

Rewrite Cells

Example:

<#ForSale:rewrite="Key='<#eachcount>.) <#Key>',Price='$<#Price>'",table>

Result:

Key Description Price
1.) 123 Short sleave shirt $19.95
2.) 124 Long sleave shirt $24.95

Use Only Records that are True for a Condition

<#ForSale:test="<#Price> == 24.95",table>

Key Description Price
124 Long sleave shirt 24.95

Table Without the Header Row

Example:

<#ForSale:table,notr>

Result:

123 Short sleave shirt 19.95
124 Long sleave shirt 24.95

Use a Database's Field's Table

Example:

<#MyDB|123|Col5:table>

Result:

Key Child
A A Value.
B B Value.

Example:

<#MyDB|123|Col5:test='"<#Key>" eq "B"'>,table>

Result:

Key Child
B B Value.