Skip navigation

Lost password? | Help

Hello World

Practical programming... and stuff...

Posts tagged with "Zend Framework"

Using layouts with Zend ViewRenderer helper

,

Note: this post is very outdated. Unless you're into archeology, I suggest using Zend_Layout.

When working with views in the Zend Framework, you normally have a view for each action in your controllers. Each of the views run a view script, which then include header and footer views in them. This may lead to some repetitive code and may cause a problem if you want to modify the way the header and footer are included in your views.

A better approach could be to use a "layout". A layour is a master view, perhaps similar to the master page in ASP.NET - it has the header, footer and all other code except the content. It effectively replaces the header and footer and is used to include the content (the action view script) inside itself instead of the action view script including the header and footer.

Read more...

Zend_Acl and storing roles and resources in a DB

,

Yet more Zend Framework -related material.

I've talked with a few people about using Zend_Acl and how to best approach the issue of resources, roles and users.

It isn't immediately obvious how one should do this:
- Create roles and resources in code?
- Load them from a database?

Read more...