Provide explicit leading '@' for {{attr '@name'}}
[mkws-moved-to-github.git] / examples / htdocs / mike.html
index 02bf56d..a806625 100644 (file)
            {{/if}}
          </td>
        </tr>
+       {{#if md-date}}
        <tr>
          <th>Date</th>
          <td>{{md-date}}</td>
        </tr>
+       {{/if}}
+       {{#if md-author}}
        <tr>
          <th>Author</th>
          <td>{{md-author}}</td>
        </tr>
+       {{/if}}
+       {{#if md-electronic-url}}
        <tr>
          <th>URL</th>
-         <td>{{md-electronic-url}}</td>
+         <td>{{link md-electronic-url}}</td>
        </tr>
+       {{/if}}
+       {{#if-any location having="md-subject"}}
        <tr>
          <th>Subject</th>
-         <td>{{md-subject}}</td>
+         <td>
+           {{#first location having="md-subject"}}
+             {{#if md-subject}}
+               {{md-subject}}
+             {{/if}}
+           {{/first}}
+         </td>
        </tr>
+       {{/if-any}}
        <tr>
          <th>Locations</th>
-         <td>{{location}}</td>
+         <td>
+           <ul>
+             {{#each location}}
+               {{#if '@name'}}
+                 <li>{{attr '@name'}}</li>
+               {{/if}}
+             {{/each}}
+           </ul>
+         </td>
        </tr>
       </table>
     </script>