- Issue created by @EliasPapa
- πΊπΈUnited States rrrob
The
getView()
method just piggybacks on top of the functionality provided by the jsonapi_views β module. They should be able to give you the information you need.
Hi,
I had a quick question relating to the getView function. How can I get a field if that field uses a relationship?
So far I have this:
const companies_carousel = await drupal.getView(
"companies--homepage_companies_carousel",
{
locale: "en",
defaultLocale: "el",
params: {
include: "field_company_logo.field_media_image",
},
}
);
This allows me to get the company logo but I need another field which are the number of job vacancies this company has. The Job content type has a field_company entity reference field and in Views I simply add that as a relationship to get Job fields related to each company. I can get this just fine using Views but I don't know how to send it through Next.js for Drupal.
Would appreciate any help you can give me.
Active
1.6
Code
The getView()
method just piggybacks on top of the functionality provided by the
jsonapi_views β
module. They should be able to give you the information you need.