<h5>Random with config limit</h5>
<ul>
{{# pages.random }}
<li><a href="{{ url }}">{{ title }}</a></li>
{{/ pages.random }}
</ul>
<h5>Random with embedded limit</h5>
<ul>
{{# pages.random_with_limit.4 }}
<li><a href="{{ url }}">{{ title }}</a></li>
{{/ pages.random_with_limit.4 }}
</ul>
*Note this works on any collection not just "pages".
Limit can be set in configuration:
pages:
random_limit: 3 # defaults to 5 in the above example plugin
Limit can be set dynamically by chaining the method call:
limit: 1
{{# pages.random_with_limit.1 }}
<li><a href="{{ url }}">{{ title }}</a></li>
{{/ pages.random_with_limit.1 }}
limit: 25
{{# pages.random_with_limit.25 }}
<li><a href="{{ url }}">{{ title }}</a></li>
{{/ pages.random_with_limit.25 }}