Widget:DisplayTable - display part of a master table elsewhere

Skip to first unread message

Jim Tittsler

May 25, 2016, 11:05:43 PM5/25/16
to wikieducator-tech
tl;dr Widget:DisplayTable allows a wiki author to build a big table in
the wiki, and then on other pages show just specified rows/columns of
that table.

It can be convenient to have a complete "database" of information, and
then select individual entries for display in different contexts. This
keeps all of the information in one place ("single source of truth"),
but provides flexibility for displaying subsets of the data. The
DisplayTable widget is one way this concept can be made
wikitext-friendly. You build a giant table in a wiki page (possibly
taking advantage of the AddToTable widget[1] to provide form-based
row-by-row entry of table data). You can then use the DisplayTable
widget to select certain rows to display on another page. You also
have the flexibility to pick just certain columns (and the order in
which they are rendered). The idea is to think of the table as your
data, and separate the selection/presentation of the data in other
wiki pages. You only need to keep one table up to date, and magically
the "subpages" remain in sync.

Example: This widget is being used for some of the OERu tables:
Master table:
Partially reused lots of places, including:

Opportunity for future development: The selection of rows is currently
quite simplistic. One could imagine a more sophisticated "query
language" for pulling out data of interest.

Feedback welcome.


[1] http://wikieducator.org/Widget:AddToTable

Jim Tittsler Tokyo
Reply all
Reply to author
0 new messages