Add minimalist CMS for editable homepage and footer content #2

Closed
LordSchmackes wants to merge 1 commits from codex/implement-minimalist-cms-for-website into main
LordSchmackes commented 2026-03-24 14:57:39 +00:00 (Migrated from github.com)

Motivation

  • Provide a lightweight, end-customer editable CMS so non-technical users can manage key homepage and footer texts in German and English without touching code or JSON files.
  • Centralize small copy and meta fields (landing headline, CTA, coming-soon text, footer byline, meta description, coming-feature bullets) under site settings so they can be edited from the admin UI.

Description

  • Introduced a cms section with DE/EN defaults in default_site_settings() (helpers.php) to store editable strings for landing copy, CTA, coming-soon badges/suffix, footer labels, page title and description, and three coming-feature bullets.
  • Added a new "Content" tab to admin.php with a save_content handler that validates a CSRF token, accepts both DE/EN values, enforces required fields for core items, merges missing language values, and persists changes via save_site_settings().
  • Updated index.php to load siteSettings['cms'] and use CMS-managed strings for the landing eyebrow/headline lines, CTA label, page <title> and meta description, coming-soon badge/suffix, and coming-feature bullets.
  • Updated partials/footer.php to render the footer byline and contact label from the CMS fields, with safe fallbacks to previous defaults so behavior is backward-compatible.

Testing

  • Ran PHP lint checks: php -l helpers.php passed.
  • Ran PHP lint checks: php -l index.php passed.
  • Ran PHP lint checks: php -l admin.php passed.
  • Ran PHP lint checks: php -l partials/footer.php passed.

Codex Task

### Motivation - Provide a lightweight, end-customer editable CMS so non-technical users can manage key homepage and footer texts in German and English without touching code or JSON files. - Centralize small copy and meta fields (landing headline, CTA, coming-soon text, footer byline, meta description, coming-feature bullets) under site settings so they can be edited from the admin UI. ### Description - Introduced a `cms` section with DE/EN defaults in `default_site_settings()` (`helpers.php`) to store editable strings for landing copy, CTA, coming-soon badges/suffix, footer labels, page title and description, and three coming-feature bullets. - Added a new "Content" tab to `admin.php` with a `save_content` handler that validates a CSRF token, accepts both DE/EN values, enforces required fields for core items, merges missing language values, and persists changes via `save_site_settings()`. - Updated `index.php` to load `siteSettings['cms']` and use CMS-managed strings for the landing eyebrow/headline lines, CTA label, page `<title>` and meta description, coming-soon badge/suffix, and coming-feature bullets. - Updated `partials/footer.php` to render the footer byline and contact label from the CMS fields, with safe fallbacks to previous defaults so behavior is backward-compatible. ### Testing - Ran PHP lint checks: `php -l helpers.php` passed. - Ran PHP lint checks: `php -l index.php` passed. - Ran PHP lint checks: `php -l admin.php` passed. - Ran PHP lint checks: `php -l partials/footer.php` passed. ------ [Codex Task](https://chatgpt.com/codex/tasks/task_e_69c29ccb09088329b255cac5a47404d1)

Pull request closed

This pull request cannot be reopened because the branch was deleted.
Sign in to join this conversation.