<?php /* Layout File, at least one main region must be added; */ $type = !empty($type) ? $type : 'wide'; $left_sidebar = !empty($left_sidebar) ? $left_sidebar : false; $right_sidebar = !empty($right_sidebar) ? $right_sidebar : false; $main = upfront_create_region(array('name' => "main", 'title' => __("Main Area"), 'scope' => "local", 'type' => $type, 'default' => true, 'allow_sidebar' => true), array('row' => 140, 'background_type' => 'color', 'background_color' => '#c5d0db')); $main->add_element('Uposts', array('id' => 'default-posts', 'columns' => 24, 'rows' => 20, 'options' => array('content_type' => 'excerpt', 'featured_image' => '1', 'post_data' => array('date')))); if ($left_sidebar) { $left = upfront_create_region(array('name' => "left-sidebar", 'title' => __("Left Sidebar"), 'scope' => "local"), array('col' => 6, 'background_type' => 'color', 'background_color' => '#fff')); $left->add_element('PlainTxt', array('id' => 'default-left-text', 'columns' => 4, 'rows' => 50, 'margin_top' => 10, 'margin_left' => 1, 'new_line' => false, 'options' => array('content' => "Text element on left sidebar", "class" => "c24 upfront-plain_txt"))); $main->add_side_region($left, 'left'); } if ($right_sidebar) { $right = upfront_create_region(array('name' => "right-sidebar", 'title' => __("Right Sidebar"), 'scope' => "local"), array('col' => 6, 'background_type' => 'color', 'background_color' => '#fff')); $right->add_element('PlainTxt', array('id' => 'default-right-text', 'columns' => 4, 'rows' => 50, 'margin_top' => 10, 'margin_left' => 1, 'new_line' => false, 'options' => array('content' => "Text element on right sidebar", "class" => "c24 upfront-plain_txt"))); $main->add_side_region($right, 'right'); } $regions->add($main);
<?php $footer = upfront_create_region(array('name' => 'footer', 'title' => __("Footer Area"), 'scope' => 'global')); $footer->add_element('PlainTxt', array('columns' => 24, 'id' => 'footer-text-default', 'rows' => 2, 'margin_top' => 6, 'options' => array('has_settings' => 1, 'content' => '<p style="text-align:center;">Text element in footer</p>', "class" => "c24 upfront-plain_txt"))); $regions->add($footer);
<?php /* Layout File, at least one main region must be added; */ $extended = $extended ? $extended : false; $main = upfront_create_region(array('name' => "main", 'title' => __("Main Area"), 'scope' => "local", 'type' => 'full', 'default' => true), array('nav_region' => $extended ? 'bottom' : '', 'background_type' => 'color', 'background_color' => '#c5d0db')); $main->add_element("ThisPost", array("id" => "default-page", "columns" => 24, "rows" => 20, "margin_top" => 1, "options" => array("post_data" => array(), "layout" => array(array("classes" => "c24 clr", "objects" => array(array("slug" => "title", "classes" => "post-part c24"))), array("classes" => "c24 clr", "objects" => array(array("slug" => "contents", "classes" => " post-part c24"))))), "sticky" => true, "disable_resize" => true, "disable_drag" => false)); if ($extended) { $nav = upfront_create_region(array('name' => "main-nav", 'title' => __("Navigation"), 'scope' => "local"), array('background_type' => 'color', 'background_color' => '#fff')); $nav->add_element('PlainTxt', array('id' => 'default-nav-text', 'columns' => 24, 'rows' => 12, 'margin_top' => 6, 'new_line' => false, 'options' => array('content' => "Text element on navigation area", "class" => "c24 upfront-plain_txt"))); $main->add_side_region($nav, 'bottom'); } $regions->add($main); if ($extended) { $content = upfront_create_region(array('name' => "content", 'title' => __("Content Area"), 'scope' => "local", 'type' => 'wide'), array('row' => 80, 'background_type' => 'color', 'background_color' => '#c5d0db')); $regions->add($content); }
<?php /* Layout File, at least one main region must be added; */ $type = !empty($type) ? $type : 'wide'; $left_sidebar = !empty($left_sidebar) ? $left_sidebar : false; $right_sidebar = !empty($right_sidebar) ? $right_sidebar : false; $main = upfront_create_region(array('name' => "main", 'title' => __("Main Area"), 'scope' => "local", 'type' => $type, 'default' => true, 'allow_sidebar' => true), array('row' => 200, 'background_type' => 'color', 'background_color' => '#c5d0db')); $main->add_element('Uimage', array('id' => 'default-image', 'columns' => 8, 'rows' => 20, 'margin_top' => 6, 'margin_left' => 1, 'new_line' => true, 'options' => array())); $main->add_element('PlainTxt', array('id' => 'default-text', 'columns' => 6, 'rows' => 10, 'margin_top' => 6, 'margin_left' => 1, 'new_line' => false, 'options' => array('content' => "<p>Text element with no background color applied<p>", "class" => "c24 upfront-plain_txt"))); $main->add_element('PlainTxt', array('id' => 'default-text-bg', 'columns' => 6, 'rows' => 10, 'margin_top' => 6, 'margin_left' => 1, 'new_line' => false, 'options' => array('content' => "<p>Text element with background color applied gets additional padding to prevent text running into sides</p>", 'background_color' => '#ffffff', "class" => "c24 upfront-plain_txt"))); if ($left_sidebar) { $left = upfront_create_region(array('name' => "left-sidebar", 'title' => __("Left Sidebar"), 'scope' => "local"), array('col' => 6, 'background_type' => 'color', 'background_color' => '#fff')); $left->add_element('PlainTxt', array('id' => 'default-left-text', 'columns' => 4, 'rows' => 50, 'margin_top' => 10, 'margin_left' => 1, 'new_line' => false, 'options' => array('content' => "Text element on left sidebar", "class" => "c24 upfront-plain_txt"))); $main->add_side_region($left, 'left'); } if ($right_sidebar) { $right = upfront_create_region(array('name' => "right-sidebar", 'title' => __("Right Sidebar"), 'scope' => "local"), array('col' => 6, 'background_type' => 'color', 'background_color' => '#fff')); $right->add_element('PlainTxt', array('id' => 'default-right-text', 'columns' => 4, 'rows' => 50, 'margin_top' => 10, 'margin_left' => 1, 'new_line' => false, 'options' => array('content' => "Text element on right sidebar", "class" => "c24 upfront-plain_txt"))); $main->add_side_region($right, 'right'); } $fixed = upfront_create_region(array('name' => "floating", 'title' => __("Floating Area"), 'scope' => "local", 'type' => 'fixed'), array('width' => 250, 'height' => 250, 'top' => 30, 'left' => 30, 'background_type' => 'color', 'background_color' => '#aeb8c2')); $main->add_side_region($fixed, 'fixed'); $regions->add($main);
<?php $header = upfront_create_region(array('name' => 'header', 'title' => __("Header Area"), 'scope' => 'global')); $header->add_element('PlainTxt', array('columns' => 24, 'id' => 'header-text-default', 'rows' => 2, 'margin_top' => 6, 'options' => array('has_settings' => 1, 'content' => '<p style="text-align:center;">Text element in header</p>', "class" => "c24 upfront-plain_txt"))); $regions->add($header);