menu_book Navigation menu

Request Lifecycle

Here’s how an HTTP request is processed in Pragma CMS:

  1. public/index.php
    • Entry point for all HTTP requests
    • Initializes the CMS (autoload, configuration, session, etc.)  
  2. sites/[site-name]/
    • Directory dedicated to the current site
    • Contains config_db, pages, themes, assets, and site-specific configurations
  3. cms-versions/[version]/system/router.php
    • Analyzes the requested URL
    • Resolves the route to the appropriate page/controller
  4. sites/[site-name]/pages/[controller-name]
    • Executes the business logic for the requested page
    • Retrieves and processes data (entries, taxonomies, relationships, etc.)  
  5. sites/[site-name]/themes/[theme-name]/templates/[template-name]
    • Final HTML rendering
    • Injects data from the controller and any relevant hooks