>> Zend_Layout example  (12,515 views)

Table of contents for Zend Framework

  1. Zend Framework and Smarty integration
  2. A better Zend Framework & Smarty integration
  3. Zend_Layout example

This example focuses on 3 aspects of the Zend Framework (v1.6):
the Zend_Layout mechanism, modules and helpers, including the ActionStack helper and a custom helper. (Please note that there is no Smarty involved in this example).

The main objective of this post is to demonstrate how components of ZF work together to produce a simple application, for this reason I will focus on the code that holds things together rather than going through line by line.

If you have any questions or things are not clear please leave a comment.

As in the previous posts in the series you can download the full working example here: zend_layout_example.zip (3.36 MB). (Note: the compressed file includes the ZF library hence about 3MB)
Please glance at the previous post on this series for hints on how to set up this example on your working server.

Lets start where all begins: bootstrap.php (more…)


Table of contents for Zend Framework

  1. Zend Framework and Smarty integration
  2. A better Zend Framework & Smarty integration
  3. Zend_Layout example

Since the first post on this series I have been working with the Zend Framework and Smarty extensively and I have greatly improved my previous integration between Smarty template engine and ZF.

I have prepared and example that you can download from the following link:
zend.zip (3.5 MB) the compressed file includes the ZF and Smarty packages.
The zip file should unpack as follow: (more…)


Table of contents for Zend Framework

  1. Zend Framework and Smarty integration
  2. A better Zend Framework & Smarty integration
  3. Zend_Layout example

I have been using Smarty (php template engine) for quite some time but I am really new to Zend Framework, in fact I started using it for the first time yesterday.

To do the integration i found two very good articles:

  1. http://devzone.zend.com/node/view/id/120
  2. http://kpumuk.info/php/zend-framework-using-smarty-as-template-engine/

However both articles refer to an older version of Zend Framework and they are a bit confusing if you are a Zend beginner like me. On this post i assume Zend Framework version 1.5 and Smarty 2.6.19 (but should work with older Smarty too). (more…)