Create title section from splice() data passed

Source last question: Range pages by passed params doesn't work
Hi guys, I have this code on my homepage:

{{ partial "spotlight" (dict "categories" "spotlight" ) }}

Now I’d like to create inside the partial a title of the section with the titles of categories passed:
example: Travel & Music

My partial range code is like that:

{{ range where (where site.RegularPages "Section" "posts") "Params.categories" "intersect" . }}
  <h2><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h2>
{{ end }}

I guess intersect expects a slice, whereas your . is probably a dict. But @jmooring pointed that out to you already in the thread you referenced. Just use
{{partial "spotlight" (slice "cat1" "cat2") }}

yes, it works great but also want to display those categories names as <h1> how can I?

Your question is so vague that I can’t answer it properly. You might want to check the documentation for functions handing arrays, I guess, and go on from there.

read here pls first: Range pages by passed params doesn't work