Sha256: 5ad7e54f07f27e83417b6a5e468e5c9a6cb45bcf2cbaebe9f9ec5cf108e2aaad

Contents?: true

Size: 493 Bytes

Versions: 14

Compression:

Stored size: 493 Bytes

Contents

Now that we know how to use partials, one might ask how to render a menu in a recursive way. For this, we only need another tag for explicitely manipulating the scope.

* sharp (#) renders its second block, in the scope of the value evaluated in first block, provided the later is not nil, undefined or empty

For the example above, our menu rendering is initiated as follows:
    <ul>
  <li>About</li>
  <li>Products</li>
  <ul>
  <li>WLang</li>
  <li>Alf</li>
  <li>Viiite</li>
</ul>
</ul>

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
wlang-3.0.1 spec/integration/examples/1-html-intro/4-recursion.md
wlang-3.0.0 spec/integration/examples/1-html-intro/4-recursion.md
wlang-2.3.1 spec/integration/examples/1-html-intro/4-recursion.md
wlang-2.3.0 spec/integration/examples/1-html-intro/4-recursion.md
wlang-2.2.4 spec/integration/examples/1-html-intro/4-recursion.md
wlang-2.2.3 spec/integration/examples/1-html-intro/4-recursion.md
wlang-2.2.2 spec/integration/examples/1-html-intro/4-recursion.md
wlang-2.2.1 spec/integration/examples/1-html-intro/4-recursion.md
wlang-2.2.0 spec/integration/examples/1-html-intro/4-recursion.md
wlang-2.1.2 spec/integration/examples/1-html-intro/4-recursion.md
wlang-2.1.1 spec/integration/examples/1-html-intro/4-recursion.md
wlang-2.1.0 spec/integration/examples/1-html-intro/4-recursion.md
wlang-2.0.1 spec/integration/examples/1-html-intro/4-recursion.md
wlang-2.0.0 spec/integration/examples/1-html-intro/4-recursion.md