<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Smart Layouts with PHP and HTML in Web Design</title>
	<atom:link href="http://www.jaredlunde.com/blog/smart-layouts-with-php-html/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jaredlunde.com/blog/smart-layouts-with-php-html/</link>
	<description>A logo design blog and web development blog by designer and developer Jared Lunde.</description>
	<lastBuildDate>Mon, 06 Sep 2010 00:49:32 -0700</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jared Lunde</title>
		<link>http://www.jaredlunde.com/blog/smart-layouts-with-php-html/comment-page-1/#comment-74</link>
		<dc:creator>Jared Lunde</dc:creator>
		<pubDate>Tue, 24 Nov 2009 19:45:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.jaredlunde.com/blog/?p=140#comment-74</guid>
		<description>Adam, what you&#039;ve discussed with two includes is definitely another solution, but for a true novice my example is probably better.  I was doing this under the assumption that a reader had little to no real understanding of PHP.  In that case, using variables such as $title and $desc that change with the pages is probably not an option.  In all honesty, this solution is probably more flexible than what you are talking about as far as varying layouts goes.

As far as I am concerned, it really comes down to a combination of preference and skill level in terms of where you go with your layout.</description>
		<content:encoded><![CDATA[<p>Adam, what you&#8217;ve discussed with two includes is definitely another solution, but for a true novice my example is probably better.  I was doing this under the assumption that a reader had little to no real understanding of PHP.  In that case, using variables such as $title and $desc that change with the pages is probably not an option.  In all honesty, this solution is probably more flexible than what you are talking about as far as varying layouts goes.</p>
<p>As far as I am concerned, it really comes down to a combination of preference and skill level in terms of where you go with your layout.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Adam Diehm</title>
		<link>http://www.jaredlunde.com/blog/smart-layouts-with-php-html/comment-page-1/#comment-69</link>
		<dc:creator>Adam Diehm</dc:creator>
		<pubDate>Tue, 24 Nov 2009 15:43:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.jaredlunde.com/blog/?p=140#comment-69</guid>
		<description>Your post shows some of the basics, but if you have a site with more than one layout in your site, you could run into problems with your structure.  Plus, having the nested includes like you have, at least for this example, simply adds another unnecessary level of complexity.  Why have an include with 3 lines, that just then calls another include...

To help make it more simple, when we are building a small site like your example would be for, we have only header and footer includes.  The header contains doctypes, any logic needed for js/css includes, along with possible header and sidebar content, depending on the appropriateness to the design.  The one thing that needs to then be addressed is differing title and meta tags.  What we do, is at the top of each page we set two variables.


This way we have the proper variables set for $title and $desc that can then be used within header.php to output.

One other quick thing, is that you are using PHP short-tags in your post.  Short-tags are improper and full PHP tag should be used in lieu of them.  They can be disabled on a server by server basis at the whim of the system administrator, and are therefore poor for portability.  Plus, to top it off, to help the situation, PHP6 will be deprecating them, making even more of a case to discontinue using them.

&lt;code&gt;&lt;strong&gt;Short tag:&lt;/strong&gt; &lt;?&lt;/code&gt; 
 &lt;code&gt;&lt;strong&gt;Full tag:&lt;/strong&gt; &lt;?php&lt;/code&gt; </description>
		<content:encoded><![CDATA[<p>Your post shows some of the basics, but if you have a site with more than one layout in your site, you could run into problems with your structure.  Plus, having the nested includes like you have, at least for this example, simply adds another unnecessary level of complexity.  Why have an include with 3 lines, that just then calls another include&#8230;</p>
<p>To help make it more simple, when we are building a small site like your example would be for, we have only header and footer includes.  The header contains doctypes, any logic needed for js/css includes, along with possible header and sidebar content, depending on the appropriateness to the design.  The one thing that needs to then be addressed is differing title and meta tags.  What we do, is at the top of each page we set two variables.</p>
<p>This way we have the proper variables set for $title and $desc that can then be used within header.php to output.</p>
<p>One other quick thing, is that you are using PHP short-tags in your post.  Short-tags are improper and full PHP tag should be used in lieu of them.  They can be disabled on a server by server basis at the whim of the system administrator, and are therefore poor for portability.  Plus, to top it off, to help the situation, PHP6 will be deprecating them, making even more of a case to discontinue using them.</p>
<p><code><strong>Short tag:</strong> &lt;?</code><br />
 <code><strong>Full tag:</strong> &lt;?php</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jared Lunde</title>
		<link>http://www.jaredlunde.com/blog/smart-layouts-with-php-html/comment-page-1/#comment-68</link>
		<dc:creator>Jared Lunde</dc:creator>
		<pubDate>Tue, 24 Nov 2009 10:13:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.jaredlunde.com/blog/?p=140#comment-68</guid>
		<description>Thank you for the comment, Matthew.  Yep, definitely about as simple as you can get.  I attribute the speed at which I learned to develop to basic organizational techniques like this, because you can so easily adapt the same principle to PHP classes, database design, etc.  By organizing your site&#039;s backend and frontend on paper  beforehand, you can really get a sense of how streamlined you can make things. A carpenter doesn&#039;t start building stairs until he has a plan you know? What&#039;s the next step?

The problem I have with using template tools like Smarty is that at some point you&#039;re not exactly learning anything about the different languages, you&#039;re really just learning how to work around a framework - which definitely isn&#039;t a bad thing for some people/projects.

I&#039;ll definitely consider doing a basic CMS with rewriting on my next development post, which if I stay on the track I&#039;ve been on should be in the next week.</description>
		<content:encoded><![CDATA[<p>Thank you for the comment, Matthew.  Yep, definitely about as simple as you can get.  I attribute the speed at which I learned to develop to basic organizational techniques like this, because you can so easily adapt the same principle to PHP classes, database design, etc.  By organizing your site&#8217;s backend and frontend on paper  beforehand, you can really get a sense of how streamlined you can make things. A carpenter doesn&#8217;t start building stairs until he has a plan you know? What&#8217;s the next step?</p>
<p>The problem I have with using template tools like Smarty is that at some point you&#8217;re not exactly learning anything about the different languages, you&#8217;re really just learning how to work around a framework &#8211; which definitely isn&#8217;t a bad thing for some people/projects.</p>
<p>I&#8217;ll definitely consider doing a basic CMS with rewriting on my next development post, which if I stay on the track I&#8217;ve been on should be in the next week.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matthew Fedak</title>
		<link>http://www.jaredlunde.com/blog/smart-layouts-with-php-html/comment-page-1/#comment-67</link>
		<dc:creator>Matthew Fedak</dc:creator>
		<pubDate>Tue, 24 Nov 2009 09:25:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.jaredlunde.com/blog/?p=140#comment-67</guid>
		<description>Very very very simple. I would recomend using smarty templates or another template engine for example. html and php can get messy and is horrible to write, although probably quicker. Think I would like to see next a post on the next step. i.e. having a page.php?url=&quot;some_page&quot; and then showing how to create a really basic cms by querying the url in a database populating the template with different content each time and maybe a nice little .htaccess re-write to sweeten the deal. I&#039;m waiting...</description>
		<content:encoded><![CDATA[<p>Very very very simple. I would recomend using smarty templates or another template engine for example. html and php can get messy and is horrible to write, although probably quicker. Think I would like to see next a post on the next step. i.e. having a page.php?url=&#8221;some_page&#8221; and then showing how to create a really basic cms by querying the url in a database populating the template with different content each time and maybe a nice little .htaccess re-write to sweeten the deal. I&#8217;m waiting&#8230;</p>
]]></content:encoded>
	</item>
</channel>
</rss>
