Files
ROC/doc/concepts.md
Javier Velilla d84f164dbd Update concepts.md
Updated concepts
2014-11-19 13:20:53 -03:00

5.0 KiB

CMS Concepts

Current implemented concepts

Table of Contents
  1. Theme
  2. Regions
  3. Blocks
  4. Modules
  5. Hooks
Theme ----- In a CMS , a theme is a collection of templates files (HTML, CSS, Images, etc ) that determine how a CMS web site looks. The goal of a theme is to let you change the look and feel of the site. Eiffel CMS is inspired by Drupal, and use the same default region names as default drupal theme.

Important Classes

  • [CMS_THEME] (/library/src/theme/cms_theme.e): Abstraction defining the interface of a CMS theme.
  • [SMARTY_CMS_THEME] (/library/src/theme/smarty_theme/smarty_cms_theme.e): Theme implemented using the [Eiffel Smarty library] (https://github.com/eiffelhub/template-smarty).
  • [CMS_TEMPLATE] (/library/src/theme/cms_template.e): Template Abstraction that contains theme, variables needed by template when rendering page as html. At the moment there is only one implementation SMARTY_CMS_PAGE_TEMPLATE. At the moment there is only one implementation [SMARTY_CMS_PAGE_TEMPLATE] (/library/src/theme/smarty_theme/smarty_cms_page_template.e).
Regions ------- The layout of a CMS web page has predefined area called **regions**. The Eiffel CMS uses the same default regions as Drupal, so let's see them in the following image. ![default page layout](http://themery.com/sites/default/files/figure-15-10.png)
regions[page_top] = Top
regions[header] = Header
regions[content] = Content
regions[highlighted] = Highlighted
regions[help] = Help
regions[footer] = Footer
regions[first_sidebar] = first sidebar
regions[second_sidebar] = second sidebar
regions[page_bottom] = Bottom
**A Region holds blocks**

What goes inside regions? Generally, regions hold smaller piece of content called blocks. Blocks hold chunks of content, like the user login form, navigation menu or the information for the footer.

Regions are defined in a configuration file theme.info.

CMS_BLOCK --------- **What is a cms block?** Blocks are chunk of content that can be created to display whatever you want, and then can be placed in various resgions in your template (theme) layout.

Important Classes

CMS_MODULES ----------- **What is a cms module?** Modules are piece of code that adds one or more features to your web site. Modules can be plugged and combined to provide a web site customized to your needs. There are modules for many purposes, for example Administratiton, Basic Authentication, etc.

Important Classes

CMS_HOOK -------- Hooks is a mechanism which provide a way for modules to interact with each other and extending blocks of the current CMS.