Search:     Advanced search

Customizing the template design layout.

Article ID: 46
Last updated: 05 Apr, 2012
Revision: 9
Print
Export to PDF
Add comment
Views: 0
Comments: 0

By default the main layout file is located at /<$ServerPath>/application/layouts/scripts/<$TemplatePath>/layout.phtml unless you change / customize the template location. You can find the Default template under admin area where you will be able to customize or switch around to many other templates you have.    See the below image :

The below image indicates which template you are presently running for public viewing. Please note that, all template is located at  :   /<$ServerPath>/application/layouts/scripts/<$TemplatePath>/  ($TemplatePath is whatever template you will have). You can edit existing / default template file as well as develop a custom template by create another directory following the layout guideline.

In our application, the fronted interface is mostly guided by layout. This application uses XML files to configure the layout of page. In this post, I will show you how to configure layout for a page manually.

In default template, we created XML files which configure layout of all front-end pages which is located at /<$ServerPath>/application/layouts/scripts/<$TemplatePath>/config/ config.xml  

Since we are using Zend fretwork , we used Zend_Layout that implements a classic Two Step View pattern, allowing developers to wrap application content within another view, usually representing the site template. Such templates are often termedlayouts by other projects, and Zend Framework has adopted this term for consistency.

The main goals of Layout are as follows:

  1.  Automate selection and rendering of layouts when used with the Zend Framework MVCcomponents.
  2.  Provide separate scope for layout related variables and content.
  3.  Allow configuration, including layout name, layout script resolution (inflection), and layout script path.
  4.  Allow disabling layouts, changing layout scripts, and other states; allow these actions from within action controllers and view scripts.
  5.  Follow same script resolution rules (inflection) as the ViewRenderer, but allow them to also use different rules.
  6.  Allow usage without Zend Framework MVC components.

Application layout files Location :


Layout File  :   /<$ServerPath>/application/layouts/scripts/<$TemplatePath>/layout.phtml
Block Files   :   /<$ServerPath> /application/layouts/scripts/<$TemplatePath>/blocks/
Layout CSS :  /<$ServerPath> /application/layouts/scripts/<$TemplatePath>/css/
Layout JS    : /<$ServerPath> /application/layouts/scripts/<$TemplatePath>/js/




Please See the images below :



This article was:  
Attached files
file Layout File.docx (15 kb)

Also read
document What is Website template
document How to change my Logo?
document Default location of Templates , JS , CSS and Images.
document Creating Custom Blocks
document Concept of MVC Modules
document Default template location of all Modules
document Sample Templates indicating the how design blocks are set.

Also listed in
folder HowTo, Tips & Tricks
folder Templates Customization
folder Maintenance and Optimization

Prev   Next
What is Website template     How to change my Logo?