Replace scratch with param
This commit is contained in:
@@ -1,8 +1,16 @@
|
||||
{{ $params := . }}
|
||||
|
||||
{{ $page := . }}
|
||||
{{ $listshowcontent := false }}
|
||||
|
||||
{{ if reflect.IsMap $params }}
|
||||
{{ $page = $params.page }}
|
||||
{{ $listshowcontent = $params.listshowcontent }}
|
||||
{{ end }}
|
||||
|
||||
{{ $class := $page.Param "paige.main.table_of_contents.class" | default "border mb-3 pe-3 ps-3 pt-3 rounded" }}
|
||||
|
||||
{{ if and $page.Content ($page.Param "paige.main.table_of_contents.hide" | not) (not (eq ($page.Scratch.Get "paige_list_show_content") true)) (ne $page.TableOfContents `<nav id="TableOfContents"></nav>`) }}
|
||||
{{ if and $page.Content ($page.Param "paige.main.table_of_contents.hide" | not) (not $listshowcontent) (ne $page.TableOfContents `<nav id="TableOfContents"></nav>`) }}
|
||||
<section class="paige-toc">
|
||||
{{ with $class }}
|
||||
<div class="{{ . }}">
|
||||
|
Reference in New Issue
Block a user