Taxonomy question

Posts are in content/apps/app1.md
In the front matter I have a few different taxonomies

---
title: "App1"
date: 2019-02-24T21:02:05+06:00
type: "post"
company: ["Company1"]
server: ["server1.com", "server2.com"]
---

In content/servers/server1.com I have:

---
title: "server1.com"
company: ["Company1"]
tags: ["Tag1"]
date: 2019-02-24T21:02:05+06:00
type: "post"
---

themes/layout/taxonomy/company.html

<ul>
{{ range (where .Site.Pages "Section" "apps") }}
     <li><a href="{{.Permalink}}">{{.Title}}</a></li> // <--- this one happens
	
     // example 1 I found online:		
     {{ range (where .Data.Pages "Params.company" "eq" "Company1") }}
	      <p>.....</p> // <-- nope
     {{ end }}
		
    // example 2 I found online		
	{{ if in .Params.companies "Company1" }}
	     <p>test</p> // <-- nope
    {{ end }}

 {{ end }}		
 </ul>

I want on the company page 2 lists:

  1. A list with all the apps made by the company
  2. A list with all the servers owned by the company

Whats the best way to achieve this?

In your company list templates create two ranges, one that filters the apps section and another that filters the server section. If you aren’t using a server section you’ll need to explain what the two lists look like, as taxonomy terms generally only list pieces of content tagged as such.

I edited my question a bit with the corresponding files.

So I get that the folders are Sections. The range section apps thing is working. I get all the files I have in the apps folder listed.

Now I only want a list from company1 apps.
Tried two things I found online but that unfortunately doesn’t work.

1 Like

As @ju52 points out, you really want to be using taxonomies. Way easier. :slight_smile:

I have taxonomies setup in my config file

[taxonomies]
  server = "servers"
  company = "companies"
  tag = "tags"

How do I get only the articles in /content/apps/ from a certain company?

You can use intersect to filter the companies .