User Tools

Site Tools


documentation:create_first_theme

This is an old revision of the document!


Creating A Basic Theme


Understanding mooSocial Theme

  • A theme has a template and styles.
  • A theme is a set of Views. In this way, you can develop any themes you want but not affected the main process.
  • A style is a set of images and css.

Creating a Theme

How to create theme

Now lets go to AdminHome > Site Manager > Themes Manager > Create a New Theme (See image) and fill the fields there shown. The only really important fields are the name and the based on, but it doesnt hurt to fill in the others too.

  • Name: the name will be displayed in Theme Manager
  • Key: it is to think about what the plugin will do, and make a unique key for your plugin. Key only contains letters, numbers and the underscore '_' with no space. Ex: redtheme
  • Based on : it is the theme that the created theme is inherited all layouts and styles.
  • Others field are optional

After that, the theme is created and all theme's files will be auto generated.

Example: Lets fill the fields like this:

At this point we have a theme and source files for template. Now lets go to the source file and check at root/app/View/Themed/Mytheme and root/app/webroot/theme/mytheme

Theme Files

Basic directory structure

  • Themed

All available themes are stored in View > Themed

A theme contains views of the modules which you want to change the way they look. When a theme is being used, its views will be used instead of the default ones.

It is unnecessary to create all views for a theme, just create views you want to change. Views is not available in a theme will be loaded from default.

default.ctp: This template file defines the general layout for all pages (header, footer, main content, etc…)

documentation/create_first_theme.1434350686.txt.gz · Last modified: 2015/08/24 01:13 (external edit)