<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:ymaps="http://api.maps.yahoo.com/Maps/V2/AnnotatedMaps.xsd">

<channel>
	<title>Square Galaxy &#187; templates</title>
	<atom:link href="http://squaregalaxy.com/tag/templates/feed/" rel="self" type="application/rss+xml" />
	<link>http://squaregalaxy.com</link>
	<description>A blog by Jacob</description>
	<lastBuildDate>Tue, 16 Mar 2010 19:11:58 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Wanted: better templating language</title>
		<link>http://squaregalaxy.com/tech/wanted-better-templating-language/</link>
		<comments>http://squaregalaxy.com/tech/wanted-better-templating-language/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 19:09:49 +0000</pubDate>
		<dc:creator>Jacob</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://jacob.peargrove.com/tech/2008/web-development/wanted-better-templating-language/</guid>
		<description><![CDATA[I need a better templating language, one where an included (called) template can change its containing (caller) template.  For example, consider this container template:

&#60;html&#62;
&#60;head&#62;
&#60;title&#62;{define-spot name="title"}&#60;/title&#62;
&#60;script language="Javascript"&#62;
{define-spot name="js"}
&#60;/script&#62;
&#60;/head&#62;
&#60;body&#62;
{include file="inside.tpl"}
&#60;/body&#62;
&#60;/html&#62;

This container creates a spot where a title can be placed and where some javascript can be placed.  It then includes another template file which will [...]


Related posts:<ol><li><a href='http://squaregalaxy.com/tech/building-a-template/' rel='bookmark' title='Permanent Link: Building a template'>Building a template</a> <small>I&#8217;ve been working on a web page template to use...</small></li>
<li><a href='http://squaregalaxy.com/tech/my-blog-post-found-in-jboss-richfaces-source/' rel='bookmark' title='Permanent Link: My blog post found in JBoss Richfaces source'>My blog post found in JBoss Richfaces source</a> <small>Today I discovered that a link to a post on...</small></li>
<li><a href='http://squaregalaxy.com/tech/octave-from-the-web/' rel='bookmark' title='Permanent Link: Octave from the web'>Octave from the web</a> <small>For one of my classes, I&#8217;ve been playing around with...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I need a better templating language, one where an included (called) template can change its containing (caller) template.  For example, consider this container template:<br />
<code><br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;{define-spot name="title"}&lt;/title&gt;<br />
&lt;script language="Javascript"&gt;<br />
{define-spot name="js"}<br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
{include file="inside.tpl"}<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</code></p>
<p>This container creates a spot where a title can be placed and where some javascript can be placed.  It then includes another template file which will put content in those spots.  This included template, inside.tpl, would look like the following:</p>
<p><code><br />
{fill-spot id="title"}Jacob's Super Page{/fill-spot}<br />
{fill-spot id="js"}alert('hello'};{/fill-spot}<br />
&lt;h1&gt;Hello&lt;/h1&gt;<br />
&lt;p&gt;This is a sample template file&lt;/p&gt;<br />
</code></p>
<p>The template language would also need to be flexible enough such that if the included template didn&#8217;t fill the spots, then things continue to work without without crashing, as if the spots had been filled with nothing.</p>
<p>The problem is that many template language translate their template into some sort of source code, and usually that source code turns out to be in a procedual language.  This means that templates are parsed from top to bottom, so by the time the inside template is included, the template parser has already parsed the spots above it, and can&#8217;t go back and fill those spots (because that would require parsing the container template twice).</p>
<p>A posible solution may be available in some template language which would allow you to parse the inner template first by placing it at the top of the container template, capturing its output, and displaying it later.  This would result in a less-elegant container template that might look like the following:</p>
<p><code><br />
{capture to="inside-contents"}<br />
{include file="inside.tpl"}<br />
{/capture}<br />
&lt;html&gt;<br />
&lt;head&gt;<br />
&lt;title&gt;{define-spot name="title"}&lt;/title&gt;<br />
&lt;script language="Javascript"&gt;<br />
{define-spot name="js"}<br />
&lt;/script&gt;<br />
&lt;/head&gt;<br />
&lt;body&gt;<br />
{show id="inside-contents}<br />
&lt;/body&gt;<br />
&lt;/html&gt;<br />
</code></p>

<p>Related posts:<ol><li><a href='http://squaregalaxy.com/tech/building-a-template/' rel='bookmark' title='Permanent Link: Building a template'>Building a template</a> <small>I&#8217;ve been working on a web page template to use...</small></li>
<li><a href='http://squaregalaxy.com/tech/my-blog-post-found-in-jboss-richfaces-source/' rel='bookmark' title='Permanent Link: My blog post found in JBoss Richfaces source'>My blog post found in JBoss Richfaces source</a> <small>Today I discovered that a link to a post on...</small></li>
<li><a href='http://squaregalaxy.com/tech/octave-from-the-web/' rel='bookmark' title='Permanent Link: Octave from the web'>Octave from the web</a> <small>For one of my classes, I&#8217;ve been playing around with...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://squaregalaxy.com/tech/wanted-better-templating-language/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Now using a new template</title>
		<link>http://squaregalaxy.com/tech/now-using-a-new-template/</link>
		<comments>http://squaregalaxy.com/tech/now-using-a-new-template/#comments</comments>
		<pubDate>Thu, 12 Oct 2006 22:57:44 +0000</pubDate>
		<dc:creator>Jacob</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://jacob.peargrove.com/tech/2006/web-development/now-using-a-new-template/</guid>
		<description><![CDATA[You may have noticed that I&#8217;ve started using a new template on this site.  It mostly works, but I&#8217;m working on tuning it up and making it better.  Eventually, I will start using  this theme on a couple of my other blogs.
Please let me know what you think and what I can [...]


Related posts:<ol><li><a href='http://squaregalaxy.com/tech/building-a-template/' rel='bookmark' title='Permanent Link: Building a template'>Building a template</a> <small>I&#8217;ve been working on a web page template to use...</small></li>
<li><a href='http://squaregalaxy.com/tech/exodus-web-page-theme/' rel='bookmark' title='Permanent Link: Exodus web page theme'>Exodus web page theme</a> <small> The last couple of days I&#8217;ve been working on...</small></li>
<li><a href='http://squaregalaxy.com/tech/wanted-better-templating-language/' rel='bookmark' title='Permanent Link: Wanted: better templating language'>Wanted: better templating language</a> <small>I need a better templating language, one where an included...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>You may have noticed that I&#8217;ve started using a <a href="http://jacob.peargrove.com/tech/2006/web-development/exodus-web-page-theme/">new template</a> on this site.  It mostly works, but I&#8217;m working on tuning it up and making it better.  Eventually, I will start using  this theme on a couple of my <a href="http://jacob.peargrove.com/blog">other</a> <a href="http://jacob.peargrove.com/religion">blogs</a>.</p>
<p>Please let me know what you think and what I can do to make it better.</p>

<p>Related posts:<ol><li><a href='http://squaregalaxy.com/tech/building-a-template/' rel='bookmark' title='Permanent Link: Building a template'>Building a template</a> <small>I&#8217;ve been working on a web page template to use...</small></li>
<li><a href='http://squaregalaxy.com/tech/exodus-web-page-theme/' rel='bookmark' title='Permanent Link: Exodus web page theme'>Exodus web page theme</a> <small> The last couple of days I&#8217;ve been working on...</small></li>
<li><a href='http://squaregalaxy.com/tech/wanted-better-templating-language/' rel='bookmark' title='Permanent Link: Wanted: better templating language'>Wanted: better templating language</a> <small>I need a better templating language, one where an included...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://squaregalaxy.com/tech/now-using-a-new-template/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Exodus web page theme</title>
		<link>http://squaregalaxy.com/tech/exodus-web-page-theme/</link>
		<comments>http://squaregalaxy.com/tech/exodus-web-page-theme/#comments</comments>
		<pubDate>Fri, 06 Oct 2006 06:55:59 +0000</pubDate>
		<dc:creator>Jacob</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://jacob.peargrove.com/tech/2006/web-development/exodus-web-page-theme/</guid>
		<description><![CDATA[ The last couple of days I&#8217;ve been working on a new web design.  This theme is called Exodus, because my previous and first theme was called Genesis.
I think that I&#8217;ll probably use this theme on my blog here.  I&#8217;ve designed it from the ground up, and I hope to AJAX-ify it when [...]


Related posts:<ol><li><a href='http://squaregalaxy.com/blogging/new-home-page/' rel='bookmark' title='Permanent Link: New home page'>New home page</a> <small>The last couple of days I spent just a little...</small></li>
<li><a href='http://squaregalaxy.com/tech/now-using-a-new-template/' rel='bookmark' title='Permanent Link: Now using a new template'>Now using a new template</a> <small>You may have noticed that I&#8217;ve started using a new...</small></li>
<li><a href='http://squaregalaxy.com/tech/adobe-error/' rel='bookmark' title='Permanent Link: Adobe Error'>Adobe Error</a> <small>Today, Adobe announced a new product: Adobe Air. The basic...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a class="imagelink" title="Exodus Theme" href="http://squaregalaxy.com/wp-content/uploads/2006/10/exodustheme.jpg"><img id="image9" style="padding: 3px; border: 1px solid black; margin:5px;" src="http://squaregalaxy.com/wp-content/uploads/2006/10/exodustheme-150x150.jpg" alt="Exodus Theme" align="left" /></a> The last couple of days I&#8217;ve been working on a new web design.  This theme is called <em>Exodus</em>, because my previous and first theme was called <em>Genesis</em>.</p>
<p>I think that I&#8217;ll probably use this theme on my blog here.  I&#8217;ve designed it from the ground up, and I hope to <acronym title="Asynchronous JavaScript and XML">AJAX</acronym>-ify it when I turn it into a Wordpress theme.</p>
<p>Please let me know what you think.</p>

<p>Related posts:<ol><li><a href='http://squaregalaxy.com/blogging/new-home-page/' rel='bookmark' title='Permanent Link: New home page'>New home page</a> <small>The last couple of days I spent just a little...</small></li>
<li><a href='http://squaregalaxy.com/tech/now-using-a-new-template/' rel='bookmark' title='Permanent Link: Now using a new template'>Now using a new template</a> <small>You may have noticed that I&#8217;ve started using a new...</small></li>
<li><a href='http://squaregalaxy.com/tech/adobe-error/' rel='bookmark' title='Permanent Link: Adobe Error'>Adobe Error</a> <small>Today, Adobe announced a new product: Adobe Air. The basic...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://squaregalaxy.com/tech/exodus-web-page-theme/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Building a template</title>
		<link>http://squaregalaxy.com/tech/building-a-template/</link>
		<comments>http://squaregalaxy.com/tech/building-a-template/#comments</comments>
		<pubDate>Fri, 10 Mar 2006 08:26:30 +0000</pubDate>
		<dc:creator>Jacob</dc:creator>
				<category><![CDATA[Technical]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://jacob.peargrove.com/blog/2006/technical/internet/building-a-template/</guid>
		<description><![CDATA[I&#8217;ve been working on a web page template to use in an upcoming project, although it might as well be used on thing like this blog or other project.  Anyway, it is art, and it is a work in progress.  It is fully XHTML complient (I think) and it is starting to come [...]


Related posts:<ol><li><a href='http://squaregalaxy.com/tech/now-using-a-new-template/' rel='bookmark' title='Permanent Link: Now using a new template'>Now using a new template</a> <small>You may have noticed that I&#8217;ve started using a new...</small></li>
<li><a href='http://squaregalaxy.com/tech/wanted-better-templating-language/' rel='bookmark' title='Permanent Link: Wanted: better templating language'>Wanted: better templating language</a> <small>I need a better templating language, one where an included...</small></li>
<li><a href='http://squaregalaxy.com/tech/harvest-the-code/' rel='bookmark' title='Permanent Link: Harvest the code'>Harvest the code</a> <small>I thought I would throw a few marbles around about...</small></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a id="p253" class="imagelink" title="Template Thumbshot" rel="attachment" href="http://jacob.peargrove.com/mytemplates/one/genericpage.html"><img id="image253" src="http://squaregalaxy.com/wp-content/uploads/2006/03/templatethumb.jpg" alt="Template Thumbshot" align="right" /></a>I&#8217;ve been working on a web page template to use in an upcoming project, although it might as well be used on thing like this blog or other project.  Anyway, it is art, and it is a work in progress.  It is fully <acronym title="eXtensible HyperText Markup Language">XHTML</acronym> complient (I think) and it is starting to come together.  I am trying to figure out though how exactly to make it better.  Feel free to take a look at it and let me know what you think.</p>

<p>Related posts:<ol><li><a href='http://squaregalaxy.com/tech/now-using-a-new-template/' rel='bookmark' title='Permanent Link: Now using a new template'>Now using a new template</a> <small>You may have noticed that I&#8217;ve started using a new...</small></li>
<li><a href='http://squaregalaxy.com/tech/wanted-better-templating-language/' rel='bookmark' title='Permanent Link: Wanted: better templating language'>Wanted: better templating language</a> <small>I need a better templating language, one where an included...</small></li>
<li><a href='http://squaregalaxy.com/tech/harvest-the-code/' rel='bookmark' title='Permanent Link: Harvest the code'>Harvest the code</a> <small>I thought I would throw a few marbles around about...</small></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://squaregalaxy.com/tech/building-a-template/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
