Comments (4)
@kaloyan-dimov did you add a new field to features component that is referencing the image.
At the moment features component does not have an image field.
Here is what it looks like.
If you made changes to it, can you show me what it look like. It will help me better help you.
Based on you code:
features: {
populate: {
background_picture: {
fields: ["url", "alternativeText", "caption", "width", "height"],
},
},
},
You are trying to populate a field called background_picture
but this field does not exist in the features component, unless you added it your self.
If so, show me what the fields look like, and I will help you figure out how to update the query.
from nextjs-corporate-starter.
Yeah that was added there previously, turns out I wasn't populating the image properly in page-populate-middleware.js:
The way it works is:
const populate = {
contentSections: {
populate: {
picture: {
fields: ["url", "alternativeText", "caption", "width", "height"],
},
buttons: {
populate: true,
},
feature: {
populate: {
fields: ["title", "description", "showLink", "newTab", "url", "text"],
media: {
fields: ["url", "alternativeText", "caption", "width", "height"],
},
media2: {
fields: ["url", "alternativeText", "caption", "width", "height"],
},
},
},
background_picture: {
fields: ["url", "alternativeText", "caption", "width", "height"],
},
This somehow helps the builder populate the picture in the section included in the flexible content (I presume this code would allow all fields in all sections with the name background_picture)
Thanks for the swift reply and let me know if populating here can be done in a better way.
from nextjs-corporate-starter.
Glad you got it working.
from nextjs-corporate-starter.
I am going to close this, but let me know if you run into any other issues.
from nextjs-corporate-starter.
Related Issues (20)
- Next 14 & Strapi Demo Project Is Here HOT 3
- [Bug] Localization issue HOT 4
- Typescript - Using the 'model.ts' file [ I added a post at the bottom on guide to implement Strapi types in the frontend. HOT 1
- Bug - responsive menu doesn't work correctly and overlay text and logo HOT 4
- TODO: Suggestion: Remove NEXT_PUBLIC Prefix for API Keys in .env File HOT 2
- Could you please add a LICENSE information. HOT 1
- TODO: Implement The Large Video Component from the Dynamic Component In The Frontend [ Issue ] HOT 3
- Multilungual Styles HOT 2
- site loads fine, when I refresh blog page it renders json chunks , not html HOT 2
- No documentation on deploying to Vercel HOT 3
- Images for navbarLogo, footerLogo & testimonials are not set by default, causing the frontend not to load HOT 2
- Reference Error: window is not defined? HOT 6
- Seed into mysql doesn't work HOT 3
- Issues on development environment in other languages HOT 5
- Warnings during yarn setup HOT 1
- error after fixing page,tsx (invariant expected app router to be mounted ) HOT 2
- Replace Gif with .mp4
- Custom color breaks the style
- Authentication with next-auth does not works with our example: https://strapi.io/blog/user-authentication-in-next-js-with-strapi
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nextjs-corporate-starter.