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

NetTuts.com:
Statamic 101
December 11, 2013 @ 10:40:41

NetTuts.com has a new tutorial posted today introducing you to Statamic, a PHP-based content management system that uses flat-files instead of database entries to manage its content. (One note, Statamic is not free software and there's no "trial" version)

Statamic is a modern PHP CMS which really makes an effort to be easy and intuitive to use. From its flat-file design to its use of technologies, like markdown and Yaml, you can accomplish an outstanding amount of work without writing any code at all. In this article we will take a look at the process from installation to setting up a basic portfolio.

The CMS (downloadable here) has a simpler structure than some other systems as most of the content is just files in the "_content" directory. They talk some about the directory structure of the tool and help you get things configured via the main YAML config. The post then moves on to working with themes and how to get dynamic content in a basic layout. From there they go on to talk about making new content, adding entries and various other topics like administration and templating.

0 comments voice your opinion now!
statamic cms introduction file markdown template layout content

Link: http://net.tutsplus.com/tutorials/php/statamic-101

Andrew Podner:
Lithium Building Views Using Layouts
February 13, 2013 @ 11:54:04

Andrew Podner has written up a new post for his site today about building views/layouts in Lithium and make the maintenance of your application simpler in the long run.

The last time I wrote about the Lithium framework, the focus was on getting information out of a MySQL database. Once you have that information, in many cases you will want to show it to the user. In this installment, we are going to look at how Lithium implements layouts for your output in an effort to improve reusability of code, which ultimately improves the developer's ability to quickly get applications up and running and it makes maintenance down the road that much easier.

He talks about the basic structure of an application (on the file system) and where the layouts and views live inside it. He includes a sample layout that defines areas for things like title, scripts, character set and main content. Code is also included showing how to use it in your application. There's also a bit about setting up a default layout in your "_init" method if you'd like to use it across the entire application.

0 comments voice your opinion now!
lithium view layout tutorial framework


Constantin Bosneaga:
Using layout pattern with CodeIgniter
October 01, 2012 @ 11:57:08

Constantin Bosneaga has a recent post to his site that the CodeIgniter users out there could find helpful. It's an example of using the Layout pattern in a CI app to make a more flexible layout thanks to a library (source included in the post).

CodeIgniter is great framework by its simplicity. But when I moved from CakePHP, I really missed layout pattern. CodeIgniter documentations offers this way to include non-changing site header and footer. For sure it isn't flexible and does not show page structure in a clear way. For many years I use layout pattern. Layout describes whole page as a template with blocks for header, menu, content, etc.

He uses this library to handle the data for your layout, including the header items (like CSS, Javascript) and the definition of a global template. It also allows you to do template inheritance, making it simpler to reuse partial templates ("blocks").

0 comments voice your opinion now!
layout designpattern codeigniter tutorial library


Rob Allen:
Module specific layouts in ZF2
September 17, 2012 @ 10:04:10

Rob Allen has a new post to his site about module-specific layouts in Zend Framework 2 via a module from Evan Coury.

If you need different layout scripts to be rendered for different modules in Zend Framework 2, then Evan Coury has made this extremely easy. His new module EdpModuleLayouts is just the ticket! Once installed, you simply have to add a new array to a config file in the config/autoload folder.

The update is just a simple "module_layouts" setting that lets you specify it based on the module name by giving it a layout path, He explains the script a bit more in the comments and points to this other post for more information about modules handling their own layouts.

0 comments voice your opinion now!
module layout zendframework2 edpmodulelayouts evancoury


Evan Coury's Blog:
Module-specific layouts in Zend Framework 2
May 11, 2012 @ 08:07:44

Evan Coury has a new Zend Framework 2 related blog post looking at how to use module specific layouts in your application (even though, technically, it's more related to the controller).

There's really no such thing as "module-specific" anything in ZF2, so what we're really talking about is the topmost namespace of the controller being dispatched. So in the case of MyModuleControllerSomeController, the topmost namespace would be MyModle. In most cases, this will be the name of a given module.

He gives a quick piece of sample code showing a "Module" class that attaches an event on the dispatch of its request. Inside this event, he grabs the controller (target) and updates the layout via a call to the "layout" method. This is all handled in the "init" method of the module, so it should "just work" when the module is used.

0 comments voice your opinion now!
module layout zendframework2 controller


Reddit.com:
PHP.net gets a new design. Opinions divided
January 25, 2012 @ 11:08:43

In this recent post on Reddit.com, there's some good discussion/feedback about the proposed redesign of PHP.net.

Opinions from commentors range widly:

  • "The layout's nice. But those colors are downright disgusting."
  • "To be honest, the new version is 100x better."
  • "It's definitely way better than the old design but still not exactly great is it?.."
  • "Much more profressional. Welcome to the 21st century PHP.net."

Have an opinion on the new layout? voice it here!

0 comments voice your opinion now!
prototype opinion layout phpnet design


Joris de Wit's Blog:
Extending different layouts for Ajax requests in Twig, Symfony2
August 29, 2011 @ 11:39:34

Joris de Wit has a (very) quick post about a handy tip he found about switching layouts easily with Twig in his Symfony2-based application - a handy ternary sort of switch that can detect when something's an Ajax request.

I just learned about the 'app' global variable in twig. It's very handy for loading a special layout for ajax requests.

The "app" variable allows you get get back at some of the settings of your application and check on special things like the isXMLHttpRequest in his example. For more information about Twig and how you can add it to your application, check out Twig-Project.org. Using it's as simple as adding a phar.

0 comments voice your opinion now!
twig symfony2 layout switch template ajax request


3 Engineers Blog:
3 Step Layouts in Zend Framework
April 04, 2011 @ 13:04:06

In a recent post to the 3 Engineers blog, they take the usual "Two Step" approach the Zend Framework takes to generating view data (Zend_View + Zend_Layout) and takes it up one more step by using Three Step Layouts with a simple wrapper.

While the Two Step View pattern creates a reasonable paradigm for seperating layout presentation from page presentation, enabling Three-level Inheritance allows for even better separation. In other words, using 3 Step Layouts is a possible and often necessary investment to make when implementing front-ends in Zend Framework projects; they allow fine grain re-usability that provides for a DRYer presentation layer.

They have a three step process you can follow (complete with code snippets) that'll have you working with their 3 layers easily. The wrapper is a sort of "boostrap" for the layout. The nested layout is then pulled into this wrapper (for example's sake, theirs is called "default") and then the view can be served as normal and placed into the content location. There's also a bit of code showing how to switch out the layout if there's ever a need - like different layouts for the admin, user and main parts of your application.

0 comments voice your opinion now!
zendframework twostep threestep layout wrapper view zendview zendlayout


Rob Allen's Blog:
A form in your layout
October 11, 2010 @ 12:11:07

If you've ever wanted to have a form that stuck with every page of your Zend Framework application, Rob Allen might just have your solution in his latest blog post.

I recently received an email asking for my advice about how to handle a form that appears on every page. I want to add a newsletter sign up box to layout.phtml so it will appear on every page. The layout->content() comes from several different action controllers... So how do I handle the newsletter sign up? I thought that the answer is long-winded enough to be worth writing a blog post about. One way to do this is to use a action helper, so let's build a simple application to show this solution.

He walks you through the creation of the simplest part first - the form that will live inside of the view helper. He chose a signup type of form with a username, email and submit button. He helps you create an action helper and the view helpers to help inject the form into the layout of each page. Then, with a simple call to "$this->signupForm()" you can drop it in anywhere in the layout.

0 comments voice your opinion now!
form layout zendframework tutorial viewhelper actionhelper


PHPBuilder.com:
Managing Zend Framework Layouts
May 25, 2010 @ 11:49:47

On PHPBuilder.com there's a new tutorial on layouts in Zend Framework applications. The tools the framework gives you makes things much simpler when it comes to changing layouts and updating the general structure of your site.

Gone is the need to devise strategies for important tasks such as maintaining page headers and footers, separating the bulk of a page's logic from its interface, and managing the code repeatedly used throughout the site to carry out special formatting actions. Instead, you can just embrace the framework's conventions and move on to the next battle. This article introduces you to some of the fundamental concepts behind managing layouts within your Zend Framework-driven applications.

He shows how to enable the layout management tools and how to create a sample layout to ensure it's working. You can also switch layouts, disable them and use a few of the helpers that come with the tool to make it simpler for you and make your development time faster.

0 comments voice your opinion now!
manage zendframework layout tutorial



Community Events





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


application community wordpress release api developer install language series laravel configure symfony list code interview introduction threedevsandamaybe unittest library podcast

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