Weird issue with template accessing params

So I have this weird issue with passing params to a template I am using on a Taxonomy page.

When I do this: {{partial "header" .}}

It does not render any of the params in . but if I do this: {{partial "header" .Page}} it displays my page params.

If I use the same template on a regular page I can access the page params without any issues, do taxonomy templates work different?

Is this some weird issue I’m running into or am I doing something wrong?


I don’t think that a taxonomy page has access to page variables. That would explain why passing . doesn’t give you page variables like .WordCount, but passing .Page would. Right?

But that’s also a bit of speculation on my part, because without seeing the code we can guess at best.

That makes sense but I made a section called Jobs and put an file and assigned the layout in the front matter to this template so in theory it should have access to the page variables again maybe I’m misunderstanding or just doing something wrong which is why I’m posting here to see if anyone else has had this issue before and so I can learn.

Thanks for replying.

But a taxonomy page itself doesn’t have access to those page params variables, as far as I know. You can access when you range over posts with a certain taxonomy term on that taxonomy page, but the taxonomy page itself doesn’t have access to them.

Say you make the content/jobs/ page and that page has the job_location variable and is tagged remote-work. But the taxonomy term page at /tags/remote-work/ doesn’t have that params because it’s a meta page: it contains all content tagged remote-work from any section, not specific to /jobs/.

Do you perhaps mixed taxonomy pages and section pages? Because a section page can access the data in content/jobs/ because that renders the section page itself.

(I hope this makes sense. I don’t explain it very well I’m afraid. :slight_smile:)

Yeah I guess I am mixing the two but I want to be able to tag jobs by department, also I use this same setup for another section on this same site and it works fine which is really weird.