From ebed52ae01b0b8940894c719517087a3872fbb45 Mon Sep 17 00:00:00 2001 From: Javier Velilla Date: Wed, 19 Nov 2014 11:16:02 -0300 Subject: [PATCH 1/2] Update concepts.md Updated concepts with Modules and Hooks --- doc/concepts.md | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/doc/concepts.md b/doc/concepts.md index 762fe13..9cd1742 100644 --- a/doc/concepts.md +++ b/doc/concepts.md @@ -4,8 +4,11 @@ CMS Concepts ##### Table of Contents [Theme](#theme) -[Regions](#regions) -[Blocks](#blocks) +[Regions](#regions) +[Blocks](#blocks) +[Modules](#modules) +[Hooks](#hooks) + Theme @@ -59,3 +62,28 @@ Blocks are chunk of content that can be created to display whatever you want, an * [CMS_MENU_BLOCK](/library/src/kernel/content/cms_menu_block.e): The class CMS_MENU_BLOCK describe how to provides a menu of navigational links. * [CMS_SMARTY_TEMPLATE_BLOCK] (/library/src/kernel/content/cms_smarty_templateblock.e) The class CMS_SMARTY_TEMPLATE_BLOCK describe how to use a CMS block with smarty template file content. + + +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_MODULE] (/library/src/modules/cms_module.e): The deferred class CMS_MODULE provides an abstraction to describe a generic module that add features to your web site. +* [CMS_RESPONSE](/library/src/service/response/cms_response.e). The deferred class CMS_RESPONSE provide an abstraction to builds the content to get process to render the output. + + + +CMS_HOOK +-------- +Hooks is a mechanism which provide a way for modules to interact with each other and extending blocks of the current CMS. + +* [CMS_HOOK] (/library/src/hooks/cms_hook.e): The deferred class CMS_HOOK is a marker interface for CMS Hook +* [CMS_HOOK_AUTO_REGISTER] (/library/src/hooks/cms_hook_auto_register.e): The deferred class provides an abstraction that when inheriting from this class, the declared hooks are automatically registered, otherwise, each descendant has to add it to the cms service itself. +* [CMS_HOOK_BLOCK](/library/src/hooks/cms_hook_block.e): The class CMS_HOOK_BLOCK describe a hook providing a way to alter a generic block. +* [CMS_HOOK_FORM_ALTER](/library/src/hooks/cms_hook_form_alter.e): The class CMS_HOOK_FORM_ATLER describe a hook providing a way to alter a form. +* [CMS_HOOK_MENU_ALTER](/library/src/hooks/cms_hook_menu_alter.e): The class CMS_HOOK_MENU_ATLER describe a hook providing a way to alter a menu. +* [CMS_HOOK_MENU_SYSTEM_ALTER](/library/src/hooks/cms_hook_menu_system_alter.e): The class CMS_HOOK_MENU_SYSTEM_ALTER describe a hook providing a way to alter the CMS menu system. +* [CMS_HOOK_VALUE_TABLE_ALTER](/library/src/hooks/cms_hook_value_table_alter.e):: The class CMS_HOOK_VALUE_TABLE_ALTER describe a hook providing a way to alter the value table for a response. From 6162432d52b8edb588163b36bcf00c732c475ed0 Mon Sep 17 00:00:00 2001 From: Javier Velilla Date: Wed, 19 Nov 2014 11:32:59 -0300 Subject: [PATCH 2/2] Update concepts.md Updated Concepts table of contents --- doc/concepts.md | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/doc/concepts.md b/doc/concepts.md index 9cd1742..8a54df0 100644 --- a/doc/concepts.md +++ b/doc/concepts.md @@ -3,11 +3,14 @@ CMS Concepts [Work in progress] ##### Table of Contents -[Theme](#theme) -[Regions](#regions) -[Blocks](#blocks) -[Modules](#modules) -[Hooks](#hooks) + +1. [**Theme**](#theme) +2. [**Regions**](#regions) + - [**Default Page Layout**](#page_layout) + - [**Regions Holds blocks**](#regions_blocks) +3. [**Blocks**](#blocks) +4. [**Modules**](#modules) +5. [**Hooks**](#hooks) @@ -27,7 +30,7 @@ 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) ``` @@ -41,7 +44,7 @@ regions[first_sidebar] = first sidebar regions[second_sidebar] = second sidebar regions[page_bottom] = Bottom ``` - + **Regions Hold 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.