I don’t really understand what you are trying to do. Where are you putting this code? What do you want it to do? Are you trying to list all the tags? Or all the tags for one content page?
On the head.html, I am trying to add a meta info content=“noindex” to tags and category pages. Currently, I got it to work using the following info code which works for both tags and categories.
{{ if .Data.Singular }}
…
{{ end }}
What I am trying to do is to separate tags and categories and have an option to turn them on/off using individually at the config.toml file.
I still don’t understand what this means. Do you mean you want to have a separate layout for /tags/ and /categories/ pages? Or do you want a tags layout that is different from a categories layout? If so have a read at the docs on lookup order I link to above.