29 lines
868 B
HTML
29 lines
868 B
HTML
<hr />
|
|
|
|
<!-- code doesn't work -- tags work much better, but leaving this here in case i figure out the issue. -->
|
|
|
|
<h3>Related Pages</h3>
|
|
|
|
<ul id="related_pages">
|
|
|
|
{% assign currentTitle = page.title %}
|
|
{% for tag in page.tags %}
|
|
{% assign counter = '0' %}
|
|
{% for page in site.pages %}
|
|
{% if page.tags contains tag and page.title != currentTitle and counter < '10' %}
|
|
{% capture counter %}{{ counter | plus:'1' }}{% endcapture %}
|
|
{% assign pageList = "" | split: "|" %}
|
|
{{ pageList | push: page.title }}
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% assign unique_pageList = pageList | uniq %}
|
|
{% for item in unique_pageList %}
|
|
<li><a href="{{ item.url}}">{{item.title}}</a></li>
|
|
{% endfor %}
|
|
{% if counter == '0' %}<span class="noOtherPages"><p>No other pages.</p></span>
|
|
{% endif %}
|
|
{% endfor %}
|
|
|
|
</ul>
|
|
|