mirror of
https://github.com/complexcaresolutions/cms.c2sgmbh.git
synced 2026-03-18 01:34:11 +00:00
New collections: - Categories: hierarchical content categorization - Pages: flexible page builder with blocks - Posts: blog/news articles with SEO - Testimonials: customer reviews/quotes Cookie & Consent management: - ConsentLogs: GDPR consent tracking - CookieConfigurations: per-tenant cookie settings - CookieInventory: cookie registry Additional: - NewsletterSubscribers: email subscription management - PrivacyPolicySettings: privacy policy configuration - SocialLinks: social media links Update Media collection with tenant support and image variants 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
34 lines
672 B
TypeScript
34 lines
672 B
TypeScript
import type { CollectionConfig } from 'payload'
|
|
|
|
export const Categories: CollectionConfig = {
|
|
slug: 'categories',
|
|
admin: {
|
|
useAsTitle: 'name',
|
|
},
|
|
access: {
|
|
read: () => true,
|
|
create: ({ req }) => !!req.user,
|
|
update: ({ req }) => !!req.user,
|
|
delete: ({ req }) => !!req.user,
|
|
},
|
|
fields: [
|
|
{
|
|
name: 'name',
|
|
type: 'text',
|
|
required: true,
|
|
localized: true,
|
|
},
|
|
{
|
|
name: 'slug',
|
|
type: 'text',
|
|
required: true,
|
|
localized: true,
|
|
unique: false, // Uniqueness per locale handled by index
|
|
},
|
|
{
|
|
name: 'description',
|
|
type: 'textarea',
|
|
localized: true,
|
|
},
|
|
],
|
|
}
|