Is your feature request related to a problem? Please describe
FAQ content is currently planned to be hardcoded in the frontend. This means any changes to questions or answers require a code deployment.
Describe the solution you'd like
Create a FAQs collection at src/payload/collections/FAQs.ts and register it in src/payload.config.ts.
Fields:
| Field |
Type |
Required |
Notes |
question |
text |
yes |
The FAQ question |
answer |
richText |
yes |
The answer (supports formatting) |
order |
number |
no |
For controlling display order |
published |
checkbox |
yes |
Default: true. Allows hiding a FAQ without deleting it |
Access control:
| Operation |
Rule |
read |
Public (no login required, only where published: true) |
create / update / delete |
Admins only |
Describe alternatives you've considered
A Payload global (single document) with an array field was considered, but a collection scales better if the FAQ list grows and allows individual publish/unpublish control.
Additional context
After creating the collection, run pnpm payload generate:types to regenerate payload-types.ts.
This collection has no dependencies on any other ticket.
Labels: feature, good first issue
BEFORE MERGING
Is your feature request related to a problem? Please describe
FAQ content is currently planned to be hardcoded in the frontend. This means any changes to questions or answers require a code deployment.
Describe the solution you'd like
Create a
FAQscollection atsrc/payload/collections/FAQs.tsand register it insrc/payload.config.ts.Fields:
questionanswerorderpublishedtrue. Allows hiding a FAQ without deleting itAccess control:
readpublished: true)create/update/deleteDescribe alternatives you've considered
A Payload global (single document) with an array field was considered, but a collection scales better if the FAQ list grows and allows individual publish/unpublish control.
Additional context
After creating the collection, run
pnpm payload generate:typesto regeneratepayload-types.ts.This collection has no dependencies on any other ticket.
Labels:
feature,good first issueBEFORE MERGING
pnpm typegen)