File: nested_objects.mustache

package info (click to toggle)
ruby-mustache 1.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 480 kB
  • sloc: ruby: 2,267; makefile: 2
file content (17 lines) | stat: -rw-r--r-- 276 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<h1>{{header}}</h1>
{{#list}}
  <ul>
  {{#item}}
    {{#current}}
      <li><strong>{{name}}</strong></li>
    {{/current}}
    {{#link}}
      <li><a href="{{url}}">{{name}}</a></li>
    {{/link}}
  {{/item}}
  </ul>
{{/list}}

{{^list}}
  <p>The list is empty.</p>
{{/list}}