Invoke "link" helper the simple way, not as an empty block.
[mkws-moved-to-github.git] / examples / htdocs / mike.html
index 6d4a721..3714e68 100644 (file)
        {{#if md-electronic-url}}
        <tr>
          <th>URL</th>
-         <td>{{#link md-electronic-url}}{{/link}}</td>
+         <td>{{link md-electronic-url}}</td>
        </tr>
        {{/if}}
        {{#if location}}
        <tr>
          <th>Subject</th>
          <td>
-           <ul>
-             {{#each location}}
-               {{#if md-subject}}
-                 <li>{{md-subject}}</li>
-               {{/if}}
-             {{/each}}
-           </ul>
+           {{#first location having="md-subject"}}
+             {{#if md-subject}}
+               {{md-subject}}
+             {{/if}}
+           {{/first}}
          </td>
        </tr>
        {{/if}}
        <tr>
          <th>Locations</th>
-         <td>{{location}}</td>
+         <td>
+           <ul>
+             {{#each location}}
+               <li>{{json this}}</li>
+             {{/each}}
+           </ul>
+         </td>
        </tr>
       </table>
     </script>