How to change content inside list.html


I am working iniside my projects /list.html, where I have a small
navigation sidebar containing this bit of code:

	{{ range $.Page.Pages }}
		<li class="custom-list-item ">
		       <a href="{{ .URL }}"> { .Title }} </a>
    {{ end }}
<div> Page content </div>

So this basically would display all of my .md files now if i press on any of the list items it takes me to a new page using the single.html template, but I want the .md file content to be displayed into the page content section while inside list.html so we would never have to change page.

How would I go by changing the data while still being inside of list.html?


This seems to be the same as your previous question: Creating a menu navigation list that changes content on the same page

Please do not open multiple posts asking the same thing. People here will answer questions when:

  1. they know the answer
  2. they have time.