-
Notifications
You must be signed in to change notification settings - Fork 68
Views and Layout
##Layout
Cpanel is shipped with a layout based on Twitter Bootstrap 2.3.1 and Font-awesome 3.2.0. This layout can be overriden by changing the config file. app/config/packages/stevemo/cpanel/config.php
.
'views' => array(
'layout' => 'layout' // app/views/layout.blade.php
)
##Cpanel views
Cpanel contains many views by default. They all can be overriden by changing the config file app/config/packages/stevemo/cpanel/config.php
.
'views' => array(
'layout' => 'layout' // app/views/layout.blade.php
'dashboard' => 'dashboard.index', // app/views/dashboard/index.blade.php
'login' => 'dashboard.login', // app/views/dashboard/login.blade.php
'register' => 'dashboard.register', // app/views/dashboard/register.blade.php
…
)
#Creating View for the default layout
Make sure to start your view with this line @extends(Config::get('cpanel::views.layout'))
.
Then later you can switch layout without changing code in your views.
##Header section The header section can be found under the menu bar. It contain a icon from the font-awesome library and your text.
@section('header')
<h3>
<i class="icon-user"></i>
Users
</h3>
@stop
##Help Section This section will be use by the help modal popup.
@section('help')
<p class="lead">My help title</p>
<p>My help text</p>
@stop
##Style and Script Section These sections can be use to add extra stylesheets/scripts.
@section('style')
{{ HTML::style('my-style.css') }}
@stop
@section('script')
{{ HTML::script('my-script.js') }}
<script>....</script>
@stop