User Guides

Folder Structure

This page provides an in-depth overview of the folder structure that LexasCMS expects.


Overview

An overview of the folder structure can be found below, we'll go into each of these directories in more detail next.

  • addons - Your websites installed addons
  • assets - Your websites assets
  • config - Your websites configuration
  • controllers - Your websites controllers
  • middleware - Your websites middleware
  • templates - Your websites templates

Addons

This directory is where you should place any addons that you would like to install. Addons that you are currently developing should also be placed in here.


Assets

Any assets that you wish to use on your website should be located in here, this directory will be publicly accessible.


Config

This is the directory that will contain all of your config files. Config files should be contained within sub directories, there will be a default directory and optionally some others which define each of your environments. For example, a typical website may have the following config directories.

/config/default/
/config/staging/
/config/production/

Controllers

This is the directory where controllers should be located. For more information about controllers and how to use them, see the Controllers section.


Middleware

This is the directory where middleware should be located. For more information about middleware and how to use them, see the Middlware section.


Templates

This is the directory that should contain all of your templates. You can structure your templates directory however you would like, as long as all of your templates are located in the 'templates' directory, they will be discoverable by LexasCMS. For more information about creating templates, see the Templating section.