Skip to content

4.1. Custom frontend themes

John edited this page Apr 17, 2019 · 1 revision
  • Upload your zipped theme and select is to set it.
  • You can always revert back to default theme.
  • Uploaded themes will appear here.
  • Select theme to set it.
  • Delete theme. If you delete an active theme, your installation front-end will revert to default theme.
  • Name of the active theme.

Theme structure

  • Theme name MUST NOT contain spaces or special characters.
  • Preferably, use one word to name your theme.
  • Required files: index.blade.php , info.txt , screenshot.png
  • Optional files and folders: css/ , /js , images/
  • info.txt - This is the theme information file and must be follow the pattern below.
Name=Blue Light Theme
Description=Blue light theme general purposer th
eme.
Author= JMuchiri
Url= http://example.com
Version= 1.0
Version date= 24-June-2017

Theme must be unique per the name of the uploaded zip file. If another theme exists with same name, it will be overwritten. On upload, index.blade.php is loaded in /resources/views/themes/<theme name>/index.blade.php All other files are uploaded to /public/themes/<theme name>/

  • theme() loads an instance of theme helper through which you can call theme functions
  • theme()->menu([options]) Loads theme menu optional menu options

Options: icons - Display font-awesome icons in front of menu item name no-submenu - Disable dropdown menu for nested menu items

Use this function as follows: theme()->menu(['icons','no-submenu']) Menu order can be set by drag and dropping order in admin settings page.

  • mainMenu() display main navigation bar
  • theme()->logoNav() display nav-bar with or without logo. Logo image must be in /public/img/logo.png
  • themeOpts()>[option] calls theme options stored in the database.

Options:

name (string)
description (text)
location (string) (path of the theme)
active (bool)
Clone this wiki locally