Location: PHPKode > projects > Blandware AtLeap Lite - CMS on PHP > atleaplite/include/layouts.php
<?php
/*
 *  Copyright 2008 Blandware (http://www.blandware.com)
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 */

/**
 * Here layouts are defined.
 *
 * @package     AtleapLite
 * @author      Roman Puchkovskiy
 * @license     http://www.apache.org/licenses/LICENSE-2.0  Apache License, Version 2.0
 */

// Menus which may be used by several layouts are defined here and not inlined

$mainMenuItems = array();
$mainMenuItems[] = array(
    'link' => buildUrl(null, null, 'newsArchive'),
    'messageKey' => 'menu.main.news.title'
);
$mainMenuItems[] = array(
    'link' => buildUrl(null, null, 'resources'),
    'messageKey' => 'menu.main.resources.title'
);
$mainMenuItems[] = array(
    'link' => buildUrl(null, null, 'category'),
    'messageKey' => 'menu.main.catalogue.title'
);
$mainMenuItems[] = array(
    'link' => buildUrl('siteMap', null, 'action'),
    'messageKey' => 'menu.main.siteMap.title'
);
$mainMenuItems[] = array(
    'link' => ADMIN_PAGE,
    'messageKey' => 'admin.console.title',
    'new' => true
);

// Layouts definitions follow

// layout for admin console pages
$adminLayout = array(
    'identifier' => 'admin',
    'system' => 'true',
    'fields' => array(
    ),
    'outerTemplate' => 'layouts/admin.tpl',
    'innerTemplate' => null,
    'menus' => array()
);

// layout for browser pages
$browserLayout = array(
    'identifier' => 'browser',
    'system' => 'true',
    'fields' => array(
    ),
    'outerTemplate' => 'layouts/browser.tpl',
    'menus' => array()
);

// layout for the main page
$mainLayout = array(
    'identifier' => 'main',
    'titleKey' => 'layout.main.title',
    'fields' => array(
        'body' => array(
            'identifier' => 'body',
            'titleKey' => 'layout.main.fields.body'
        )
    ),
    'outerTemplate' => 'layouts/main.tpl',
    'innerTemplate' => 'layouts/main_content.tpl',
    'menus' => array (
        'main' => array(
            'identifier' => 'main',
            'titleKey' => 'menu.main.title',
            'items' => $mainMenuItems
        )
    )
);

// layout for the internal front-end pages
$internalLayout = mergeArrays($mainLayout, array(
    'identifier' => 'internal',
    'titleKey' => 'layout.internal.title',
    'fields' => array(
        'body' => array(
            'identifier' => 'body',
            'titleKey' => 'layout.internal.fields.body'
        )
    ),
    'outerTemplate' => 'layouts/frontend.tpl',
    'innerTemplate' => 'layouts/frontend_content.tpl'
    // menus are inherited from main layout
    )
);

// layout for news item pages
$newsItemLayout = mergeArrays($mainLayout, array(
    'identifier' => 'newsItem',
    'titleKey' => 'layout.newsItem.title',
    'fields' => array(
        'body' => array(
            'identifier' => 'body',
            'titleKey' => 'layout.newsItem.fields.body'
        )
    ),
    // outer template is inherited
    'innerTemplate' => 'layouts/news_item_content.tpl'
    // menus are inherited from main layout
    )
);

/**
 * Layouts
 */
$layouts = array(
    $adminLayout,
    $browserLayout,
    $mainLayout,
    $internalLayout,
    $newsItemLayout
);

?>
Return current item: Blandware AtLeap Lite - CMS on PHP