<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 18 May 2013 18:23:12 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Andrew Podner: Lithium: Building Views Using Layouts]]></title>
      <guid>http://www.phpdeveloper.org/news/19176</guid>
      <link>http://www.phpdeveloper.org/news/19176</link>
      <description><![CDATA[<p>
<i>Andrew Podner</i> has written up a new post for his site today about <a href="http://unassumingphp.com/lithium-building-views-using-layouts/">building views/layouts in Lithium</a> and make the maintenance of your application simpler in the long run.
</p>
<blockquote>
The last time I wrote about the <a href="http://lithify.me/">Lithium framework</a>, 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.
</blockquote>
<p>
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.
</p>]]></description>
      <pubDate>Wed, 13 Feb 2013 11:54:04 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Constantin Bosneaga: Using layout pattern with CodeIgniter]]></title>
      <guid>http://www.phpdeveloper.org/news/18537</guid>
      <link>http://www.phpdeveloper.org/news/18537</link>
      <description><![CDATA[<p>
<i>Constantin Bosneaga</i> has a recent post to his site that the CodeIgniter users out there could find helpful. It's an example of <a href="http://a32.me/2012/09/using-layout-pattern-with-codeigniter/">using the Layout pattern</a> in a CI app to make a more flexible layout thanks to a library (source included in the post).
</p>
<blockquote>
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.
</blockquote>
<p>
He uses <a href="http://a32.me/other/layout/Layout.php.txt">this library</a> 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").
</p>]]></description>
      <pubDate>Mon, 01 Oct 2012 11:57:08 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Rob Allen: Module specific layouts in ZF2]]></title>
      <guid>http://www.phpdeveloper.org/news/18482</guid>
      <link>http://www.phpdeveloper.org/news/18482</link>
      <description><![CDATA[<p>
<i>Rob Allen</i> has <a href="http://akrabat.com/zend-framework-2/module-specific-layouts-in-zf2/">a new post</a> to his site about module-specific layouts in Zend Framework 2 via <a href="https://github.com/EvanDotPro/EdpModuleLayouts">a module</a> from <i>Evan Coury</i>.
</p>
<blockquote>
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 <a href="https://github.com/EvanDotPro/EdpModuleLayouts">EdpModuleLayouts</a> is just the ticket! Once installed, you simply have to add a new array to a config file in the config/autoload folder.
</blockquote>
<p>
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 <a href="http://blog.evan.pro/module-specific-layouts-in-zend-framework-2">this other post</a> for more information about modules handling their own layouts.
</p>]]></description>
      <pubDate>Mon, 17 Sep 2012 10:04:10 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Evan Coury's Blog: Module-specific layouts in Zend Framework 2]]></title>
      <guid>http://www.phpdeveloper.org/news/17944</guid>
      <link>http://www.phpdeveloper.org/news/17944</link>
      <description><![CDATA[<p>
<i>Evan Coury</i> has a new Zend Framework 2 related blog post looking at how to use <a href="http://blog.evan.pro/module-specific-layouts-in-zend-framework-2">module specific layouts</a> in your application (even though, technically, it's more related to the controller).
</p>
<blockquote>
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.
</blockquote>
<p>
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.
</p>]]></description>
      <pubDate>Fri, 11 May 2012 08:07:44 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Reddit.com: PHP.net gets a new design. Opinions divided]]></title>
      <guid>http://www.phpdeveloper.org/news/17448</guid>
      <link>http://www.phpdeveloper.org/news/17448</link>
      <description><![CDATA[<p>
In <a href="http://www.reddit.com/r/PHP/comments/om9gm/phpnet_gets_a_new_design_opinions_divided_great/">this recent post</a> on Reddit.com, there's some good discussion/feedback about the <a href="http://prototype.php.net/">proposed redesign of PHP.net</a>.
</p>
<p>Opinions from commentors range widly:</p>
<ul>
<li>"The layout's nice. But those colors are downright disgusting."
<li>"To be honest, the new version is 100x better."
<li>"It's definitely way better than the old design but still not exactly great is it?.."
<li>"Much more profressional. Welcome to the 21st century PHP.net."
</ul>
<p>
Have an opinion on <a href="http://prototype.php.net/">the new layout</a>? <a href="http://www.reddit.com/r/PHP/comments/om9gm/phpnet_gets_a_new_design_opinions_divided_great/">voice it here</a>!
</p>]]></description>
      <pubDate>Wed, 25 Jan 2012 11:08:43 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Joris de Wit's Blog: Extending different layouts for Ajax requests in Twig, Symfony2]]></title>
      <guid>http://www.phpdeveloper.org/news/16784</guid>
      <link>http://www.phpdeveloper.org/news/16784</link>
      <description><![CDATA[<p>
<i>Joris de Wit</i> has a (very) <a href="http://jorisdewit.ca/2011/08/27/extending-different-layouts-for-ajax-requests-in-twig-symfony2/">quick post</a> about a handy tip he found about switching layouts easily with <a href="http://twig-project.org">Twig</a> in his Symfony2-based application - a handy ternary sort of switch that can detect when something's an Ajax request.
</p>
<blockquote>
I just learned about the 'app' global variable in twig. It's very handy for loading a special layout for ajax requests.
</blockquote>
<p>
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 <a href="http://www.twig-project.org/documentation">Twig-Project.org</a>. Using it's as simple as adding a phar.
</p>]]></description>
      <pubDate>Mon, 29 Aug 2011 11:39:34 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[3 Engineers Blog: 3 Step Layouts in Zend Framework]]></title>
      <guid>http://www.phpdeveloper.org/news/16144</guid>
      <link>http://www.phpdeveloper.org/news/16144</link>
      <description><![CDATA[<p>
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 <a href="http://3engineers.clariondoor.com/creating-3-step-layouts-with-zendlayout">Three Step Layouts with a simple wrapper</a>.
</p>
<blockquote>
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.
</blockquote>
<p>
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.
</p>]]></description>
      <pubDate>Mon, 04 Apr 2011 13:04:06 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Rob Allen's Blog: A form in your layout]]></title>
      <guid>http://www.phpdeveloper.org/news/15261</guid>
      <link>http://www.phpdeveloper.org/news/15261</link>
      <description><![CDATA[<p>
If you've ever wanted to have a form that stuck with every page of your Zend Framework application, <i>Rob Allen</i> might just <a href="http://akrabat.com/zend-framework/a-form-in-your-layout/">have your solution</a> in his latest blog post.
</p>
<blockquote>
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.
</blockquote>
<p>
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.
</p>]]></description>
      <pubDate>Mon, 11 Oct 2010 12:11:07 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPBuilder.com: Managing Zend Framework Layouts]]></title>
      <guid>http://www.phpdeveloper.org/news/14554</guid>
      <link>http://www.phpdeveloper.org/news/14554</link>
      <description><![CDATA[<p>
On PHPBuilder.com there's a <a href="http://www.phpbuilder.com/columns/Jason_Gilmore052010.php3">new tutorial on layouts</a> 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.
</p>
<blockquote>
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.
</blockquote>
<p>
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.
</p>]]></description>
      <pubDate>Tue, 25 May 2010 11:49:47 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[NETTUTS.com: Context Includes]]></title>
      <guid>http://www.phpdeveloper.org/news/11216</guid>
      <link>http://www.phpdeveloper.org/news/11216</link>
      <description><![CDATA[<p>
The NETTUTS blog has another <a href="http://nettuts.com/working-with-cmss/context-includes/">WordPress-related post</a> today that looks at "context includes" - changing the look and feel of the postings based on the content type they're tagged with.
</p>
<blockquote>
The great thing about WordPress is that it doesn't limit how content is displayed, but provides a 'framework' of ways to do so. Even better, it's possible to change the display according to the content. When writing this tutorial it was hard to explain what's going on... But the best way is this: the post will be displayed within the loop according to its content - or contextual differences. Either way, it's including specific files that match up to the category of the post.
</blockquote>
<p>
There's plenty of <a href="http://nettuts.com/working-with-cmss/context-includes/">code to go around</a> introducing you to the parts of the typical WodPress install you'll be working with and some CSS to help you style the resulting changes. You can download the <a href="http://nettuts.s3.amazonaws.com/092_contextIncludes/contextIncludes.zip">source</a> and check out <a href="http://nettuts.s3.amazonaws.com/092_contextIncludes/preview/index.html">a live demo</a> of the end result.
</p>]]></description>
      <pubDate>Wed, 15 Oct 2008 10:23:51 -0500</pubDate>
    </item>
  </channel>
</rss>
