locomotivecms/engine — pull request #319 by paulsponagl (2012-03-07 16:40:14+00:00)
Title: added a snippet option to the liquid nav tag 

this is useful if you want to render more than
just a page.title string within the nav list item.
(page.menueimage, page.menueteaser...)

use nav snippet: "" to provide a string
or nav snippet: "" to load the snippet from db.
added page. too for usage within liquid templates.

test included

---8<--- Example:

snippet: menuecontent

{{ page.title }}

{{ page.menueteaser }}

nav tag in page:

{% nav site, exclude: '\.*\-bottom', depth: 2, snippet: menuecontent %}

{% block menuecontent %}
{% editable_short_text 'menueteaser' %}{% endeditable_short_text %}
{% editable_file 'menueimage' %}{% endeditable_file %}
{% endblock %}

now an author is able to upload menueimages and write menueteasers
within the page itself