News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Brandon Savage's Blog:
Controlling Access Zend_Navigation and Zend_Acl
April 02, 2010 @ 08:59:55

In the next part of his Zend_Navigation series Brandon Savage takes a look at integrating it with Zend_Acl to add permissions/roles into the mix, showing certain things for certain users.

What happens when you have special areas of your site, say for subscribers or administrators? Controlling access is something that all web developers must do at some point. This is where integration between Zend_Navigation and Zend_Acl comes in.

He shows how to set up the access control levels for an "Admin" section in an example navigation array. It uses the "resource" and "privilege" attributes to define the group and role that has access to that navigation item. Then, with a "setAcl" call you can pull that information in and the two lines of code to output it.

0 comments voice your opinion now!
zendnavigation aendacl permissions access


Brandon Savage's Blog:
Making Zend_Navigation Useful
March 31, 2010 @ 09:18:23

As a follow-up to his previous post on Zend_Navigation Brandon Savage takes a look at how to make it more useful by using some of the methods that come bundled with the component.

This is certainly wonderful and exciting, but the reality is that for the most part, Zend_Navigation is a pretty useless component of Zend Framework until you have a way to get the data out of the structure you've built. And since navigation is a component of most people's views, we have a view helper to give us the tools we need.

This view helper, "navigation", gives you some interesting functionality including what he illustrates - fineOneBy, htmlify, building breadcrumbs, menu generation and a way to finally render the menu as output. You can see more of the options/methods in the Zend Framework manual for the helper.

0 comments voice your opinion now!
zendnavigation tutorial viewhelper zendframework


Brandon Savage's Blog:
An Intro To Zend_Navigation
March 30, 2010 @ 13:33:08

As he progresses more in his work with the Zend Framework (and learns along the way) Brandon Savage is sharing some of the handy new things he's come across. In his latest post he looks at the Zend_Navigation component and gives you an overview of how it all works.

I wanted to write a primer that others could use to get started with Zend_Navigation. This is a short guide to how Zend_Navigation works, and how you can use it to improve your application.

His primer starts with a bit of vocabulary you'll need to know before you get started - things like MVC pages, URI pages and containers. He helps you create Zend_Navigation-enabled pages, both a simple one that just makes an object and a more complex one that uses a tree structure (as defined in an array) to help build the navigation element.

0 comments voice your opinion now!
zendnavigation navigation configuration tutorial


Robert Basic's Blog:
Playing with Zend_Navigation and routes
August 10, 2009 @ 08:13:12

In this new post to his blog Robert Basic looks at the Zend_Navigation component of the Zend Framework and how it can be used to more correctly handle bad requests.

I wanted to set up routes in such way that when a user requests a page, all requests for non-existing controllers/modules are directed to a specific controller (not the error controller). In other words, if we have controllers IndexController, FooController and PageController, anything but http://example.com/index and http://example.com/foo is directed to the PageController.

Using the Zend_Controller_Router_Route_Regex component he creates an expression that matches anything but the two allowed controllers and pushes them back over to the "page" controller. The new route is put in place via an addRoute call. He also shows how to use the Zend_Navigation component to manage the navigation structure for this application, defining a PHP array of the nested sitemap if the site.

0 comments voice your opinion now!
zendnavigation route regex tree


Wenbert Del Rosario's Blog:
Zend Framework Making the Built-in Breadcrumb Helper Work
May 28, 2009 @ 12:55:32

New on his blog today Wenbert Del Rosario has posted a tutorial about getting the Zend_Navigation helper to work in your application and correctly handle making/updating breadcrumbs as you navigate around the site.

In the latest release of Zend Framework (1.8.1 as of this writing), there is a new built-in view helper to render your breadcrumb needs. There is a section in the documentation that tells us how to use it. But I got a little confused when I tried to make it work. So, here is a short example on how I made my breadcrumbs work using the new breadcrumb view helper from Zend Framework.

He includes the code to create the breadcrumb trail - making a Zend_Navigation container and defining the structure of the site inside. Displaying the correct links is then just a call to the breadcrumbs() method on the object (with the ability to set depth and to set the last item in the list as a link or not).

0 comments voice your opinion now!
tutorial breadcrumb zendnavigation



Community Events





Don't see your event here?
Let us know!


symfony language series release list composer library introduction conference artisanfiles security voicesoftheelephpant framework opinion interview community laravel tool podcast version

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework