Managed Business Technology Solutions Website Development & Hosting Virus Removal & Cleanup System Restoration & Data Recovery
Vipre Internet Security
Home > Knowledge Base

Concrete5 Cheat Sheet

 
URL Prefix
  1. <?=$this->getThemePath()?>/
 
To Embed A Stack Directly In Theme
  1. <?php
  2. $stack = Stack::getByName('Stack_Name');
  3. $ax = Area::get($stack, STACKS_AREA_NAME);
  4. $ax->display($stack);
  5. ?>
 
Defining A Global Area
  1. <?php
  2. $ga = new GlobalArea('Global_Area_Name');
  3. $ga->display();
  4. ?>
 
Creating Editable Blocks
  1. <? $a = new Area('Main'); $a->display($c); ?>
  2. <? $a = new Area('Sidebar'); $a->display($c); ?>
  3. <? $a = new Area('Column3'); $a->display($c); ?>
 
Print Page Name
  1. <?php $page = Page::getCurrentPage(); echo $page->getCollectionName() ?>
 
Print Site Name
  1. <?php print SITE; ?>

 

Concrete5 Header / Footer Required
  1. <?php Loader::element('header_required'); ?>
  2. <?php Loader::element('footer_required'); ?>

 

Cron Job Settings Example

wget -q -O /dev/null http://www.example.com

10 (ten after)
3 (3 am)
*
*
*

 

Site.php Settings
  1. <?php
  2.  
  3. define('DB_SERVER', 'localhost');
  4. define('DB_USERNAME', 'abcdefghijklmnop');
  5. define('DB_PASSWORD', '12345678901234');
  6. define('DB_DATABASE', a1b2c3d4e5f6);
  7. define('PASSWORD_SALT', 'aabbccddeeffgghhiijjkkllmmoopp');
  8.  
  9. define('PERMISSIONS_MODEL', 'advanced');
  10. define('USER_PASSWORD_MINIMUM', 8);
  11.  
  12. define('WHITE_LABEL_LOGO_SRC', '/files/bw/logo_menu.png');
  13. define('WHITE_LABEL_DASHBOARD_BACKGROUND_SRC', '/files/bw/dash_bg.jpg');
  14. define('WHITE_LABEL_APP_NAME', 'bwWebAdmin');
  15. define('ENABLE_INTELLIGENT_SEARCH_HELP', false);
  16. define('ENABLE_NEWSFLOW_OVERLAY', false);
  17. define('ENABLE_APP_NEWS', false);
  18. define('ENABLE_CUSTOM_DESIGN', false);
  19.  
  20. define('PAGE_TITLE_FORMAT', '%1$s - %2$s');
  21. define('BASE_URL', 'http://www.example.com');
  22.  
  23. define('URL_REWRITING_ALL', true);
  24.  
  25. define('EMAIL_DEFAULT_FROM_NAME', 'EXAMPLE.COM');
  26. define('EMAIL_DEFAULT_FROM_ADDRESS', 'website@example.com');
  27. define('FORM_BLOCK_SENDER_EMAIL', 'website@example.com');
  28. define('EMAIL_ADDRESS_REGISTER_NOTIFICATION_FROM', 'website@example.com');
  29.  
  30. if ( extension_loaded('apc') && ini_get('apc.enabled') == "1")
  31. { define('CACHE_LIBRARY', 'apc'); }
  32.  
  33. ?>
Hard Coded Breadcrumbs
  1. <?php
  2. $bt_main = BlockType::getByHandle('autonav');
  3. $bt_main->controller->displayPages = 'top';
  4. $bt_main->controller->orderBy = 'display_asc';
  5. $bt_main->controller->displaySubPages = 'relevant_breadcrumb';
  6. $bt_main->controller->displaySubPageLevels = 'all';
  7. $bt_main->controller->displayPagesIncludeSelf = 1;
  8. $bt_main->render('templates/breadcrumb');
  9. ?>
Ting - Mobile that makes sense