This is the second part of a slow tutorial in how to build complex tables and views using the new ListPages. It's based on a new page manager that will eventually let us "manage all pages (rename, delete, tag) from one place", as weneed:55 says. You can play with the work in progress as we develop it.

2. Styling the table

Last time I explained how to build a simple table. It does not do a lot but even if the page manager is incomplete, we might as well make it pretty. Here is some more CSS styling that makes the results look more professional:

If there are no pages to show, the resulting table is invalid because there are no rows. This will make your page show [[table]] [[/table]]. We fix that by inserting an empty row at the end of table:

appendLine="[[row]][[cell]][[/cell]][[/row]][[/table]]"

The empty row will collapse to a thin line that does not disturb the look of the table. It would be nicer if ListPages did not show either appendLine or prependLine if there were no pages. But we work with what we have.