releasing version 4.0 of the doc theme. Major overhaul to the theme. Now it supports multiple doc projects within the same project. The intent is to replicate CCMS behavior so that an entire team can work off of the same project, each operating somewhat independently or not on various subprojects.
This commit is contained in:
28
_includes/related_pages.html
Normal file
28
_includes/related_pages.html
Normal file
@ -0,0 +1,28 @@
|
||||
<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>
|
||||
|
Reference in New Issue
Block a user