nhance/app/Views/docs
2026-05-22 15:01:14 +05:30
..
partials FEAT_DOCS_CONTD 2026-05-22 15:01:14 +05:30
acl.php FEAT_DOCS&LIVE_ISSEUS&USER_BOCK_UI 2026-05-18 12:28:19 +05:30
api-rate-limiter.php FEAT_DOCS&LIVE_ISSEUS&USER_BOCK_UI 2026-05-18 12:28:19 +05:30
background-jobs.php FEAT_DOCS&LIVE_ISSEUS&USER_BOCK_UI 2026-05-18 12:28:19 +05:30
bds-commission.php FEAT_DOCS_CONTD 2026-05-22 15:01:14 +05:30
bds-insurer-statement.php FEAT_DOCS_CONTD 2026-05-22 15:01:14 +05:30
cicd.php FEAT_DOCS&LIVE_ISSEUS&USER_BOCK_UI 2026-05-18 12:28:19 +05:30
correction.php FEAT_DOCS_CONTD 2026-05-22 15:01:14 +05:30
deletion.php FEAT_DOCS_CONTD 2026-05-22 15:01:14 +05:30
deployment.php FEAT_DOCS&LIVE_ISSEUS&USER_BOCK_UI 2026-05-18 12:28:19 +05:30
docs_footer.php FEAT_DOCS&LIVE_ISSEUS&USER_BOCK_UI 2026-05-18 12:28:19 +05:30
docs_header.php FEAT_DOCS_CONTD 2026-05-22 15:01:14 +05:30
docs_main_close.php FEAT_DOCS&LIVE_ISSEUS&USER_BOCK_UI 2026-05-18 12:28:19 +05:30
docs_main_open.php FEAT_DOCS_CONTD 2026-05-22 15:01:14 +05:30
docs_sidebar.php FEAT_DOCS&LIVE_ISSEUS&USER_BOCK_UI 2026-05-18 12:28:19 +05:30
eb-rack-rate-calculation.php FEAT_DOCS_CONTD 2026-05-22 15:01:14 +05:30
eb-rack-rate-config.php FEAT_DOCS&LIVE_ISSEUS&USER_BOCK_UI 2026-05-18 12:28:19 +05:30
file-uploads.php FEAT_DOCS&LIVE_ISSEUS&USER_BOCK_UI 2026-05-18 12:28:19 +05:30
inception.php FEAT_DOCS_CONTD 2026-05-22 15:01:14 +05:30
input-security.php FEAT_DOCS&LIVE_ISSEUS&USER_BOCK_UI 2026-05-18 12:28:19 +05:30
installation_content.php FEAT_DOCS&LIVE_ISSEUS&USER_BOCK_UI 2026-05-18 12:28:19 +05:30
installation.php FEAT_DOCS&LIVE_ISSEUS&USER_BOCK_UI 2026-05-18 12:28:19 +05:30
non-eb-claims.php FEAT_DOCS_CONTD 2026-05-22 15:01:14 +05:30
non-eb-opportunities.php FEAT_DOCS_CONTD 2026-05-22 15:01:14 +05:30
README.md FEAT_DOCS&LIVE_ISSEUS&USER_BOCK_UI 2026-05-18 12:28:19 +05:30
s3-cloudfront.php FEAT_DOCS&LIVE_ISSEUS&USER_BOCK_UI 2026-05-18 12:28:19 +05:30
si-enhancement.php FEAT_DOCS_CONTD 2026-05-22 15:01:14 +05:30
tpa-recon.php FEAT_DOCS&LIVE_ISSEUS&USER_BOCK_UI 2026-05-18 12:28:19 +05:30
visit-offboard.php FEAT_DOCS&LIVE_ISSEUS&USER_BOCK_UI 2026-05-18 12:28:19 +05:30
visit-onboard.php FEAT_DOCS&LIVE_ISSEUS&USER_BOCK_UI 2026-05-18 12:28:19 +05:30

CI4 Dev Docs

Docs pages live in app/Views/docs/. Shared layout partials live in app/Views/docs/partials/.

File list

File Purpose
docs_header.php <head>, CSS tokens, top bar, opens <div class="docs-layout">
docs_sidebar.php Left nav sidebar — edit the $nav array to add/remove pages
docs_main_open.php Opens <main>, renders breadcrumb, h1, meta row
docs_main_close.php Closes </main>, prev/next nav, right TOC, closes layout div
docs_footer.php Global footer bar, hljs init, closes </body></html>
installation.php Sample content-only page — copy this as the template for every new page

How to use

With DocsController, each docs page should contain content only. Do not render docs_header, docs_sidebar, docs_main_open, docs_main_close, or docs_footer inside individual page views, because the controller already wraps the page with the full layout.

Each docs page should look like this:

<?php
/**
 * Content only.
 * The controller injects the layout and page metadata.
 */
?>

<p>...</p>
<h2 id="section-one">Section One</h2>
<p>...</p>

Adding a new page to the sidebar

Open app/Controllers/Docs/DocsController.php and update:

  1. The $nav array to add a sidebar link.
  2. The $pages array to map the slug to its view and metadata.

Example:

['id' => 'my-new-page', 'label' => 'My New Page', 'url' => 'docs/my-new-page'],

'my-new-page' => [
    'view'         => 'docs/my-new-page',
    'title'        => 'My New Page',
    'breadcrumb'   => 'Getting Started',
    'last_updated' => 'May 2026',
    'author'       => 'Core Team',
    'read_time'    => '3 min read',
    'toc'          => [
        ['label' => 'Section One', 'href' => '#section-one'],
    ],
    'prev'         => null,
    'next'         => null,
],

Then create app/Views/docs/my-new-page.php by copying installation.php and updating only the page content.


Available content components

All CSS is in docs_header.php. These classes are ready to use in any page:

Class / Element What it renders
<h2 id="..."> <h3 id="..."> Section headings (id required for TOC scroll)
.callout.info Blue info box
.callout.warning Amber warning box
.callout.danger Red danger box
.callout.success Green success box
<ol class="steps"> Numbered step list with connector lines
<table> Styled data / param / API tables
.badge.get/post/put/delete HTTP method badges
.badge.req / .badge.opt Required / Optional param badges
.param-name Monospace blue param name in tables
.code-header + <pre> Dark code block with filename header

Route setup (CI4)

Add a catch-all route in app/Config/Routes.php:

$routes->get('docs',          'Docs\DocsController::index');
$routes->get('docs/(:segment)', 'Docs\DocsController::page/$1');

Then in DocsController, let the controller render the content view and wrap it:

public function page(string $slug): string
{
    $config = $this->getPageConfig($slug);
    $content = $this->renderContentView($config['view'], $config);

    return $this->renderDocPage($config, $content);
}