Error ranging different post-types when sections are added

So awhile back I started building a tumblr style hugo website for sharing work and ideas and links. @jmooring gave me some extremely helpful advice and I ended up with this:

{{ range .Site.RegularPages }}
{{ partial (printf "post-types/%s.html" .Type) . }}
{{ end }}

I decided to wrap that concept back into a full website, but in order to keep things working the way I had in my head, post-type is a section in /content.

When I go to add something like to /content to build an about page, it kicks back an error:

 failed to render pages: render of "home" failed: "/Users/illwill/Code/": execute of template failed at <partial (printf "post-types/%s.html" .Type) .>: error calling partial: partial "post-types/page.html" not found 

How would I go about excluding other types from that partial post-types and just go back to regular templates?

Edit: I am assuming that this is what I am looking for?

{{ range where .Site.RegularPages "Type" "in" site.Params.postTypes }} and adding what I want to render out as a postType in the params for the site config.

That seems to do what I am trying to accomplish. False alarm.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.