Skip to content

Commit

Permalink
fix condition to determine next-prev entry for filetree (#724)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoxys authored Oct 20, 2023
1 parent 712be2e commit 1266dd4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions layouts/partials/menu-filetree-np.html
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
{{ $name := $current.Scratch.Get "refName" }}

{{ if $current.Scratch.Get "getNext" }}
{{ if $this.Content }}
{{ $current.Scratch.Set "nextPage" (dict "name" $name "this" $this) }}
{{ $current.Scratch.Set "getNext" false }}
{{ if or $this.Content $this.Params.geekdocFlatSection }}
{{ $current.Scratch.Set "nextPage" (dict "name" $name "this" $this) }}
{{ $current.Scratch.Set "getNext" false }}
{{ end }}
{{ end }}

Expand All @@ -67,8 +67,8 @@
{{ $current.Scratch.Set "getNext" true }}
{{ end }}

{{ if $this.Content }}
{{ $current.Scratch.Set "prev" (dict "name" $name "this" $this) }}
{{ if or $this.Content $this.Params.geekdocFlatSection }}
{{ $current.Scratch.Set "prev" (dict "name" $name "this" $this) }}
{{ end }}

{{ $sub := and (ne $numberOfPages 0) (not .Params.geekdocFlatSection) }}
Expand Down

0 comments on commit 1266dd4

Please sign in to comment.