Is it possible to use complement from a partial? I am making a sidebar for a list page as a partial. The sidebar should show a list of pages related to the nested section that is opened in the browser.
1) What should be shown in the sidebar when viewing content/s1/s1-1/_index.md ?
2) What should be shown in the sidebar when viewing content/s1/s1-1/p1.md ?
From the template that renders content/s1/s1-1/_index.md
{{ partial "pages-in-current-section.html" . }}
layouts/partials/pages-in-current-section.html
{{ with .CurrentSection.Pages }}
<ul>
{{ range . }}
<li><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></li>
{{ end }}
</ul>
{{ end }}
git clone --single-branch -b hugo-forum-topic-48495 https://github.com/jmooring/hugo-testing hugo-forum-topic-48495
cd hugo-forum-topic-48495
hugo server
Before I test this, I came upon your comment on multi-page posts some months back and implemented option 2 which is included in $paginator. Will this code work without splitting the individual pages inside multipage to show up as related in the sidebar?