Skip to content

Commit f3d9c36

Browse files
committed
Sort tactics and techniques in matrix and killchain views
1 parent 42e1dd4 commit f3d9c36

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎_includes/elements/blade__matrix.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
</label>
1515
<div class="tab-content">
1616
<ul>
17-
{% assign tactics = site.tactics | where_exp:"p", "p.parent == phase.id" %}
17+
{% assign tactics = site.tactics | where_exp:"p", "p.parent == phase.id" | sort: "title" %}
1818
{%for tactic in tactics %}
1919
<li>
2020
<input type="checkbox" class="technique-checkbox" id="{{ tactic.slug }}-{{ forloop.index }}">
@@ -23,7 +23,7 @@
2323
</label>
2424
<div class="tab-subcontent">
2525
<ul>
26-
{% assign techniques = site.techniques | where_exp:"p", "p.parent contains tactic.id" %}
26+
{% assign techniques = site.techniques | where_exp:"p", "p.parent contains tactic.id" | sort: "title" %}
2727
{%for technique in techniques %}
2828
<li><a href="{{ technique.url }}">{{technique.title}}</a></li>
2929
{%endfor%}

‎_includes/page__kc.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
{% assign alltactics = site.tactics | where_exp:"p", "p.parent == phase.id" %}
4444
{% for tactictitle in page.tactics %}
4545
{% assign newkc_tactics = alltactics | where_exp:"p", "p.title == tactictitle" %}
46-
{% assign tactics = tactics | concat: newkc_tactics %}
46+
{% assign tactics = tactics | concat: newkc_tactics | sort: "title" %}
4747
{%endfor%}
4848

4949
<div class="col-12 col-lg">
@@ -57,7 +57,7 @@
5757
{% assign alltechniques = site.techniques | where_exp:"p", "p.parent contains tactic.id" %}
5858
{% for techniquetitle in page.techniques %}
5959
{% assign newkc_techniques = alltechniques | where_exp:"p", "p.title == techniquetitle" %}
60-
{% assign techniques = techniques | concat: newkc_techniques %}
60+
{% assign techniques = techniques | concat: newkc_techniques | sort: "title" %}
6161
{%endfor%}
6262

6363
<div class="tab">

0 commit comments

Comments
 (0)