Accessing all the content from the index/main page

Hi,

I have a very basic site that has a content for members and list of publications. I can create the independent pages fine. I can access and iterate over all the members and publications.

Now I want to be able to access both the members and the publications from within the main page (index.html). I basically want to list the two latests publications or two specific members within the main/index page. How can I do that?

Thank you,
-drd

Ah, never mind, I found it:

{{ range .Data.Pages }}
	{{ if eq "members" .Type }}
			<p> {{ .Params.name }}
			<p>{{ .Params.bio }}
			<hr>
  {{ end }}
{{ end }}

{{ range where .Data.Pages "Type" "members" }}
	<p>{{ .Params.name }}
	<p>{{ .Params.bio }}
	<hr>
{{ end }}
2 Likes