slim 3 view example app > Homepage

Welcome to the example

This example app has a very simple structure as shown below

Folder Structure
app
├── app.php
├── config.json
└── themes
    ├── alternative
    │   ├── layouts
    │   │   └── page.phtml
    │   └── views
    │       └── pages
    │           └── about.phtml
    └── default
        ├── layouts
        │   └── default.phtml
        └── views
            ├── bits
            │   ├── header.phtml
            │   └── nav.phtml
            └── pages
                ├── about.phtml
                └── homepage.phtml
        
  • config.json provides the data to be set on the theme, including theme specific settings
  • app.php shares all templates from default globally, so when `alternative` theme doesn't have a view template, it'll just borrow from default; when it does, it uses its own template.
  • Click the navigation links to browse the alternative themes