Add menu with other case blog posts
parent
0308ea1a5d
commit
925d342b97
|
@ -16,6 +16,28 @@
|
|||
{{ end }}
|
||||
</div>
|
||||
</aside>
|
||||
<!--
|
||||
If the current blog post belongs to a case, we will add a side menu
|
||||
with all other blog posts belonging to that case, emphasis to the current.
|
||||
-->
|
||||
{{ with .CurrentSection.Params.Title }}
|
||||
<aside class="menu" id="case">
|
||||
<p class="menu-label">
|
||||
Dans le dossier « {{ . }} »...
|
||||
</p>
|
||||
<ul class="menu-list">
|
||||
{{ $posts := (where $.Site.RegularPages "CurrentSection.Params.Code" "==" $.CurrentSection.Params.Code )}}
|
||||
{{ $postsSorted := (sort $posts "Date" )}}
|
||||
{{ range $postsSorted }}
|
||||
<li><a
|
||||
{{ if eq $.Title .Title }}
|
||||
class="is-active"
|
||||
{{ end }}
|
||||
href="{{ .Permalink }}">{{ .Title }}</a></li>
|
||||
{{ end }}
|
||||
</ul>
|
||||
</aside>
|
||||
{{ end }}
|
||||
<section id="main">
|
||||
<h1 id="title">{{ .Title }}</h1>
|
||||
<div>
|
||||
|
|
Loading…
Reference in New Issue