cms:impresspages
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
cms:impresspages [2013/03/24 15:15] – skipidar | cms:impresspages [2023/11/01 07:13] (current) – ↷ Page moved from business_process_management:camunda:cms:impresspages to cms:impresspages skipidar | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ===== Imresspages CMS ===== | ||
+ | A nice looking drag and drop CMS: https:// | ||
+ | |||
+ | |||
+ | ===== Fallpits ===== | ||
+ | |||
+ | ^Issue^ Answer^ | ||
+ | |Howto choose the first zone?| The top zone, listed in the **Backend> | ||
+ | |||
+ | ^Error^ Solution^ | ||
+ | | Class ' | ||
+ | |||
+ | |||
+ | |||
+ | ===== Concepts ===== | ||
+ | |||
+ | ==== Zone ==== | ||
+ | Zones are [[http:// | ||
+ | < | ||
+ | A zone is filled by a module (plugin) \\ | ||
+ | | {{http:// | ||
+ | |||
+ | |||
+ | Zones are listed in menu and can be filled by pages: \\ | ||
+ | | {{http:// | ||
+ | |||
+ | ==== Plugins = Modules ==== | ||
+ | Plugins alias Modules contribute functionality. [[http:// | ||
+ | |||
+ | ==== Global Variables ==== | ||
+ | |||
+ | The full list can be found in file " | ||
+ | |||
+ | ^VAR ^RESULT^ | ||
+ | |BASE_URL | http:// | ||
+ | |BASE_URL.THEME_DIR | http:// | ||
+ | |BASE_URL.THEME_DIR.THEME | http:// | ||
+ | |BASE_URL.LIBRARY_DIR|http:// | ||
+ | |BASE_DIR|Z:/ | ||
+ | |BASE_DIR.LIBRARY_DIR|Z:/ | ||
+ | |BASE_DIR.MODULE_DIR|Z:/ | ||
+ | |BASE_URL.PLUGIN_DIR|http:// | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ===== Plugin ===== | ||
+ | |||
+ | |||
+ | ^Step ^Howto ^ Link^ | ||
+ | |0. Create a Template | Create a template with for the new zone, add a custom block where the plugin content will be presented, by doing < | ||
+ | |1. Write Plugin with an own **zone** | |http:// | ||
+ | |2. Install the new Module.| Click on " | ||
+ | |3. Create a Zone in BE.| Create a Zone in the Backend> Developer> | ||
+ | |4. Populate the block from point 0. with content |Create a **System** File in your plugin folder to populate your Block you generated in 0. with content. You can add some JavaScript / CSS to the page too by doing < | ||
+ | $site-> | ||
+ | $site-> | ||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Commands ===== | ||
+ | |||
+ | <sxh php> | ||
+ | // | ||
+ | <? | ||
+ | <? | ||
+ | |||
+ | //generate a link to a custom_zone | ||
+ | <?php echo '<a href="' | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ===== Ajax ===== | ||
+ | |||
+ | == Add Javascript == | ||
+ | Add the **m g a** vars (http:// | ||
+ | To point to the right controler. | ||
+ | |||
+ | <sxh js> | ||
+ | //in system import the *.js | ||
+ | // 2 is the internal import priority. Default is 1. Makes script be imported after all other, like jquery. | ||
+ | $site-> | ||
+ | </ | ||
+ | |||
+ | <sxh js> | ||
+ | $(document).ready(function() { | ||
+ | console.log(" | ||
+ | showRandomSentence(); | ||
+ | }); | ||
+ | |||
+ | |||
+ | //post request to our plugin to get new sentence | ||
+ | function showRandomSentence() { | ||
+ | var data = Object(); | ||
+ | data.g = ' | ||
+ | data.m = ' | ||
+ | data.a = ' | ||
+ | |||
+ | |||
+ | $.ajax( { | ||
+ | type : ' | ||
+ | url : ip.baseUrl, // | ||
+ | data : data, | ||
+ | success : sentenceResponse, | ||
+ | dataType : ' | ||
+ | }); | ||
+ | } | ||
+ | |||
+ | function sentenceResponse(response) { | ||
+ | |||
+ | console.log(" | ||
+ | console.log(response); | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | == Add php in sentenceResponse.php | ||
+ | <sxh js> | ||
+ | class Controller extends \Ip\Controller{ | ||
+ | public static function getNewSentence() { | ||
+ | global $site; | ||
+ | $data = array( | ||
+ | ' | ||
+ | ' | ||
+ | ); | ||
+ | | ||
+ | $answer = json_encode($data); | ||
+ | $site-> | ||
+ | } | ||
+ | |||
+ | } | ||
+ | </ |