Editing WikiDB/Repeat tag syntax
From TestWiki
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 5: | Line 5: | ||
<repeat table="..." criteria="..." sort="...">Any old wiki text, with {{{variable}}} substitution.</repeat> | <repeat table="..." criteria="..." sort="...">Any old wiki text, with {{{variable}}} substitution.</repeat> | ||
− | The tag | + | The table attribute is required, and defines where the data comes from. The table does not need to be defined on the wiki - the tag will pull data for all rows that specified this table, even if the table does not exist. |
− | + | The criteria is optional. Specifying this allows you to specify which records to return. Options are currently ''very'' limited, partly due to limitations of passing in an attribute. Currently you can provide a comma-separated list of "field=value" or "field!=value" pairs, which are ANDed together. | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | The sort contains a comma separated list of fields with an optional 'DESC' modifier (e.g. "Field1,Field2 DESC,Field3"). The rows are sorted by the fields in the order specified. | |
== Controlling the rendering == | == Controlling the rendering == | ||
Line 36: | Line 31: | ||
|- | |- | ||
</header> | </header> | ||
− | | '''{{{Name}}}''' <small>{{{Location}}}</small> || {{{Revenue | + | | '''{{{Name}}}''' <small>{{{Location}}}</small> || {{{Revenue}}}<br> |
|- | |- | ||
<footer> | <footer> | ||
Line 50: | Line 45: | ||
|- | |- | ||
</header> | </header> | ||
− | | '''{{{Name}}}''' <small>{{{Location}}}</small> || {{{Revenue | + | | '''{{{Name}}}''' <small>{{{Location}}}</small> || {{{Revenue}}}<br> |
|- | |- | ||
<footer> | <footer> |