Skip to content

Step 6: Create a layout template

Choose a tag to compare

@artingo artingo released this 13 Nov 22:53
· 16 commits to master since this release

Create a layout template. To do so, follow these steps:

  1. Create a views\partials sub-directory.
  2. Cut the code of HTML <head>, top navigation, sidebar and footer and paste it into their corresponding PhP files.
  3. require all partials in the loadView() function.
  4. Create a public folder and css, img, js and webfonts sub-folders. Download the corresponding resources to these directories and modify the links to use the local copies.
  5. Tell the PhP server to use the public directory with these parameters:

    php -S localhost:8080 -t public