This page shows how to iterate over sub-pages to create a dynamic table of contributors.
var s = page.parent.subpages;
if(#s) {
<table class="table">
<tr>
<th>"Title";</th>
<th>"Author";</th>
<th>"Gravatar";</th>
</tr>
foreach(var p in s) {
<tr class="{{__count % 2 ? 'bg2' : 'bg1'}}" >
<td>web.link(p.uri, p.title)</td>
<td>web.link(p.author.uri, p.author.name);</td>
<td>p.author.gravatar;</td>
</tr>
}
</table>
}
| Images 0 | ||
|---|---|---|
| No images to display in the gallery. |
Copyright © 2011 MindTouch, Inc. Powered by