Render Page

Navigation:  Development > MVC (Model View Controller) > View > Admin Theme >

Render Page

Previous pageReturn to chapter overviewNext page

We can define a page to render in Admin Panel under a specific tab.

 

Here are some basis steps to render a page in admin panel

1.Theme Selection

2.Page Template

3.Customize Admin View

 

Theme Selection

By default system loads frontend theme and for admin theme we have to set Layout from Action Method. See below example:
 
$this->layout = 'admin';

 

This instruction just set admin theme from that page. After layout selection we set admin tab and do admin like below:
 
$this->check_admin_login();
$this->admin_tab = 'tab_name';
 

Admin Tab Name is the node  defined in Interface Builder. But generally we use below function that select tab as well as do the user logged in check.
 
$this->setAdminTab(TAB_NAME);
 
Fore example: $this->setAdminTab('page_manager');

 

Page Template:
Page template is basically Action Template we create for an Action Method.
 
If we set admin layout than below priority set to load template.

1.Admin Theme is first priority to load from System folder.

2.If the template does not exists in System folder then try to load it from Website Theme folder.

3.If none of theme found then it just shows the layout area.

 

Customize Admin View

By below variables we can customized admin page.
 

disable_admin_header : Disable Header

disable_admin_footer : Disable Footer

admin_content_full_length: Show content in full length with content wrapper

admin_content_clear_length: Show content in full length without content wrapper

 

For example: $this->set('disable_admin_header','Yes');