<?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/"
	>

<channel>
	<title>@ fake&#039;s &#187; typo3</title>
	<atom:link href="http://plind.dk/tag/typo3/feed/" rel="self" type="application/rss+xml" />
	<link>http://plind.dk</link>
	<description>customized rants from a PHP dev&#039;s viewpoint</description>
	<lastBuildDate>Wed, 11 Aug 2010 12:52:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Typo3 site fail</title>
		<link>http://plind.dk/2010/05/15/typo3-site-fail/</link>
		<comments>http://plind.dk/2010/05/15/typo3-site-fail/#comments</comments>
		<pubDate>Sat, 15 May 2010 13:45:06 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[fail]]></category>
		<category><![CDATA[typo3]]></category>

		<guid isPermaLink="false">http://plind.dk/?p=379</guid>
		<description><![CDATA[Have a look at the image below &#8211; a screenshot from a website I came across. It&#8217;s a quite clear, massive fail (unless you&#8217;re fluent in whatever font is used). This is something that can happen to any site, if you&#8217;re messing with I18N or L10N &#8211; something goes completely screwy. However, it&#8217;s also one [...]]]></description>
			<content:encoded><![CDATA[<p>Have a look at the image below &#8211; a screenshot from a website I came across. It&#8217;s a quite clear, massive fail (unless you&#8217;re fluent in whatever font is used). This is something that can happen to any site, if you&#8217;re messing with I18N or L10N &#8211; something goes completely screwy. However, it&#8217;s also one of those things that &#8211; when using a professional CMS &#8211; just should work without massive headaches or hidden traps. Typo3 wants be a professional CMS, so, following the logic, this shouldn&#8217;t happen (or the site author should have massive warning bells ringing).</p>
<p><a href="http://www.typo3experts.com"><img class="aligncenter size-full wp-image-380" title="typo3site" src="http://plind.dk/wp-content/uploads/2010/05/typo3site.jpg" alt="Website used to promote TYPO3 Kochbuch" width="500" height="255" /></a></p>
<p>What went wrong here? Well, several things. First off, the site uses Typo3 to generate images containing text &#8211; and uses that for links. In itself a horrible idea that&#8217;s very bad for SEO but is used by Typo3 so users can get &#8220;that special font&#8221;. It wouldn&#8217;t be so bad though if it wasn&#8217;t for the fact the there&#8217;s either a mismatch between encoding somewhere in the system or the font needed can&#8217;t be found or used (I&#8217;m assuming that the install hasn&#8217;t been hacked and someone switched the font used to wingdings). If the system had just been outputting text and setting the wrong encoding then at least users would be able to manually switch. As is, there&#8217;s just no way of figuring out what the text is supposed to be. Your best bet is looking at the html source and trying to find out by looking at the link titles &#8211; not exactly what you want users to do.</p>
<p>Now, to add an extra bit of irony to this: the site name is Typo3 Experts and they&#8217;re hyping their Typo3 cookbook. Would you buy it after seeing this site?</p>
]]></content:encoded>
			<wfw:commentRss>http://plind.dk/2010/05/15/typo3-site-fail/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Review of TYPO3 Multimedia Cookbook</title>
		<link>http://plind.dk/2010/04/23/review-of-typo3-multimedia-cookbook/</link>
		<comments>http://plind.dk/2010/04/23/review-of-typo3-multimedia-cookbook/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 10:44:06 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Reviews]]></category>
		<category><![CDATA[book review]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[typo3]]></category>
		<category><![CDATA[Typo3 Multimedia Cookbook]]></category>

		<guid isPermaLink="false">http://plind.dk/?p=356</guid>
		<description><![CDATA[As mentioned a while ago in another blogpost of mine, I received a copy of a Typo3 book for reviewing. Tons of time has passed and I have now finally managed to do the review (yes, I know, it&#8217;s a month and half late &#8230; or more). Anyway &#8230; on to the reading. Introduction The [...]]]></description>
			<content:encoded><![CDATA[<p>As mentioned a while ago in <a title="Read the Typo3 Book Review post" href="http://plind.dk/2010/02/05/typo3-book-review/">another blogpost of mine</a>, I received a copy of a Typo3 book for reviewing. Tons of time has passed and I have now finally managed to do the review (yes, I know, it&#8217;s a month and half late &#8230; or more). Anyway &#8230; on to the reading.</p>
<h2>Introduction</h2>
<p>The book I&#8217;m reviewing here is <a title="View the details of the book on the Packt site" href="http://www.packtpub.com/typo3-4-3-multimedia-cookbook/book/mid/040510r71kzn?utm_source=plind.dk&amp;utm_medium=affiliate&amp;utm_content=blog&amp;utm_campaign=mdb_003215">TYPO3 4.3 Multimedia Cookbook</a> by Dan Osipov, published by Packt Publishing. The title gives you a good idea as to the content but if you were in doubt, the sub title spells it out: ”Over 50 great recipes for effectively managing multimedia content to create an organized website in TYPO3”. The aim of the book is thus to help you take care of the more or less typical problems connected with handling multimedia in Typo3, by giving you step-by-step recipes for putting solutions in place. How well the book achieves that is what I&#8217;ll be looking at here.</p>
<h2>The book</h2>
<p>Before I dive into the recipes, there are a two general points to make. First, for a book about multimedia, it unfortunately comes across a bit lacking: the images in the book (of which there are a few) are consistently too dark. It might have been a tradeoff to make sure the graphics stands out better, but it just doesn&#8217;t look good and hence gives the book a slightly unfinished or rushed feel.</p>
<p>Another thing to note is the approach to code sections the author has taken. A book like this could easily fill up most of it&#8217;s pages with code, leading either to a very large book or very short descriptions. The approach chosen here is another: most of the recipes that involve code of some size direct you to download the appropriate code, after which the most important parts are explained. Whether you see this as a positive thing or not depends mainly on taste, I suppose – personally I prefer being able to look at all the code that makes up a given recipe, instead of having to move to another media to get an overview.</p>
<h2>The recipes</h2>
<p>The book is divided into eight categories: Getting Started, Managing Digital Assets, Operating with Metadata in Media Files, Rendering Images, Rendering Video and Audio, Connecting to External APIs, Creating Services, and Automating Processes. As should be obvious given the list, it&#8217;s covering a lot of different situations, which is both positive and negative. It&#8217;s great because it gives the book a lot of diversity and you&#8217;re almost certain to get inspired by some of the recipes – too much ground is covered for there not to be something interesting for everyone.</p>
<p>However, among all the things the book covers you&#8217;ll also find things that seem irrelevant to the topic. For instance, the first chapter has a total of eight recipes – only three of these actually deal with Typo3. The rest are short recipes on how to setup a web server or an NFS share – not exactly everyday topics when running your Typo3 site. The three recipes that do deal with Typo3 focus on setting Typo3 up and creating a template – again, not something you&#8217;re likely to be looking for when you&#8217;re having multimedia problems. It seems as though the first chapter aims to create a common ground, so the Typo3 newbie can join the party as well – but that&#8217;s not the premise of the book. The second chapter is better but also has some chapters that suffer from this. The third chapter is a mix: two recipes explain how to set metadata in image and audio files using tools like Photoshop, while the rest explain how you can extract the data in Typo3. After that, the rest of the book is on topic.</p>
<p>That&#8217;s about the negative I have to note about the book – the rest is positive. The remaining recipes range from ”Good to know” or ”I can use that” to ”Hey, that&#8217;s pretty cool!”. The chapters on rendering images and audio/videofall into the first category, while the last three chapters (Connecting to External APIs, Creating Services and Automating Processes) are in the latter. For instance, the recipes on using Amazons S3 services are pretty nifty as are the recipes on creating services (especially the detailed walkthrough of how to convert audio using a service).</p>
<p>Overall, the recipes are well written up: they all follow the same useful layout (preparation, step-by-step guide, explanation, further points, references to other recipes) which helps you grasp the information quicker, the language is easy to dig into, and the recipes contain helpful screenshots of interfaces you&#8217;ll be dealing with (one of the things that might otherwise overwhelm you). As pointed out, most of the recipes do not include all of the code needed for functionality but they do explain the key points and they use enough space to make sure you understand what&#8217;s going on – which makes it a fair chance you&#8217;ll be able to use what you learn in other contexts.</p>
<h2>Conclusion</h2>
<p>I was happy to receive a copy of the Multimedia Cookbook to review: after reading it, I think it&#8217;s a good guide to multimedia issues and I&#8217;m pretty sure I&#8217;ll be using some of the recipes. As such, it&#8217;s given me some practical hints on how to do things. It&#8217;s also given me a better insight into some things Typo3 though, which is another bonus from reading it. I would expect the payoff for experienced Typo3 developers to be less on both accounts, but I still imagine it would be an ok addition to the library, as the cookbook layout makes it ideal for reading whenever you come across a specific multimedia related problem.</p>
<p>That said, it&#8217;s not the best handbook I&#8217;ve even com across – the problems mentioned (irrelevant recipes and minor layout problems) coupled with the ”get the code online then return to the book”-approach subtract somewhat from it, unfortunately. I still think it&#8217;s a good guide though and have no trouble recommending it. So if you&#8217;re wondering how to handle multimedia in Typo3 or just feel like expanding your Typo knowledge, I&#8217;d say give it a read.</p>
]]></content:encoded>
			<wfw:commentRss>http://plind.dk/2010/04/23/review-of-typo3-multimedia-cookbook/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Back from OSD</title>
		<link>http://plind.dk/2010/03/10/back-from-osd/</link>
		<comments>http://plind.dk/2010/03/10/back-from-osd/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 07:29:52 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[networking]]></category>
		<category><![CDATA[OpenSourceDays]]></category>
		<category><![CDATA[OSD]]></category>
		<category><![CDATA[T3UG]]></category>
		<category><![CDATA[T3UGDK]]></category>
		<category><![CDATA[typo3]]></category>

		<guid isPermaLink="false">http://plind.dk/?p=338</guid>
		<description><![CDATA[The OpenSourceDays conference is through now (has been since Sunday, actually, but work has been keeping me very busy) and a quick reflection tells me that it was great to be there. Some of the highlights: A good presentation from Signal Digital about ding.TING: a new open source frontend for libraries in Denmark, using Drupal [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.opensourcedays.org/2010/">OpenSourceDays</a> conference is through now (has been since Sunday, actually, but work has been keeping me very busy) and a quick reflection tells me that it was great to be there. Some of the highlights:</p>
<ul>
<li>A good presentation from <a href="http://www.signaldigital.com/">Signal Digital</a> about <a href="http://www.signaldigital.com/referencer/dingting-et-biblioteksprojekt/">ding.TING</a>: a new open source frontend for libraries in Denmark, using Drupal</li>
<li>Part of a presentation of Groovy on Grails &#8211; it definitely piqued my interest (I only got part because the presenter was taken ill half-way through)</li>
<li>Meeting Typo3 people: Christian Jul Jensen from <a href="http://www.mocsystems.com/">MOC Systems</a>, Stig Kjeldsen from <a href="http://www.opengate.dk/">OpenGate</a>, and Søren Malling from <a href="http://www.dkm.dk/">DKM</a></li>
<li>Helping out a bit in transforming the site of the Danish Typo3 user group. It currently looks like <a href="http://www.t3ug.dk/">an ad for washing powder</a> and that&#8217;s going to end.</li>
<li>Meeting a guy with an idea for a site project and agreeing that we should make this happen sometime soon.</li>
</ul>
<p>So, overall, it was very enjoyable and a bit of an eye-opener (it was my first IT conference). There&#8217;s a big chance I&#8217;ll be going again next year, that&#8217;s for sure &#8211; the helping out bit was actually rather fun, especially the second part.</p>
<p>However, this means that <a href="http://plind.dk/2010/02/05/typo3-book-review/">the Typo3 Multimedia Cookbook review I&#8217;ve mentioned</a> has been moved back about a week or so &#8211; it needs a bit of time for reading and fairness.</p>
]]></content:encoded>
			<wfw:commentRss>http://plind.dk/2010/03/10/back-from-osd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Typo3 book review</title>
		<link>http://plind.dk/2010/02/05/typo3-book-review/</link>
		<comments>http://plind.dk/2010/02/05/typo3-book-review/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 10:12:39 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[book review]]></category>
		<category><![CDATA[Packt]]></category>
		<category><![CDATA[review]]></category>
		<category><![CDATA[typo3]]></category>
		<category><![CDATA[Typo3 Multimedia Cookbook]]></category>

		<guid isPermaLink="false">http://plind.dk/?p=317</guid>
		<description><![CDATA[I&#8217;ve been given the chance to review the new Typo3 Multimedia Cookbook that Packt is publishing. Right now it should be in the mail on it&#8217;s way to me and hopefully will arrive in a week or so. After that, I&#8217;ll be enjoying some serious tech reading on Typo3 :) I found the Typo3: Enterprise Content [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://plind.dk/wp-content/uploads/2010/02/Typo-4.3.png"><img class="alignright size-full wp-image-318" title="Typo 4.3" src="http://plind.dk/wp-content/uploads/2010/02/Typo-4.3.png" alt="Typo3 4.3 Multimedia Cookbook" width="100" height="123" /></a>I&#8217;ve been given the chance to review the new <a title="Typo3 Multimedia Cookbook at the Packt store" href="http://www.packtpub.com/typo3-4-3-multimedia-cookbook/book/mid/040510r71kzn?utm_source=plind.dk&#038;utm_medium=affiliate&#038;utm_content=blog&#038;utm_campaign=mdb_003215">Typo3 Multimedia Cookbook</a> that Packt is publishing. Right now it should be in the mail on it&#8217;s way to me and hopefully will arrive in a week or so. After that, I&#8217;ll be enjoying some serious tech reading on Typo3 :) I found the <a href="http://typo3book.packtpub.com">Typo3: Enterprise Content Management</a> book from Packt quite useful, so I&#8217;m hoping the Multimedia Cookbook will be even better &#8211; we&#8217;ll see. The description of the book certainly does inspire a certain appetite for reading:</p>
<blockquote><p>The book gives you a step-by-step process for organizing an effective multimedia system. It also gives solutions to commonly encountered problems, and offers a variety of tools for dealing with multimedia content.</p></blockquote>
<p>There&#8217;ll be a minor delay before the review goes online, though, as I&#8217;m off on holidays next week for two weeks &#8211; so I expect I&#8217;ll be done with the review start March or so. Come back for more reading then :)</p>
]]></content:encoded>
			<wfw:commentRss>http://plind.dk/2010/02/05/typo3-book-review/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Comparing CMS/blog systems, part 3.1: TYPO3 day to day</title>
		<link>http://plind.dk/2009/12/14/comparing-cmsblog-systems-part-3-1-typo3-day-to-day/</link>
		<comments>http://plind.dk/2009/12/14/comparing-cmsblog-systems-part-3-1-typo3-day-to-day/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 23:38:43 +0000</pubDate>
		<dc:creator>Peter</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[learning]]></category>
		<category><![CDATA[CMS]]></category>
		<category><![CDATA[series]]></category>
		<category><![CDATA[typo3]]></category>
		<category><![CDATA[typoscript]]></category>

		<guid isPermaLink="false">http://plind.dk/?p=254</guid>
		<description><![CDATA[The individual posting on the blogs and cms&#8217; will be bigger, given that there&#8217;s simply more to do than for installing. Hence, I&#8217;ve decided to split the posts into smaller chunks, dealing with one product at a time. On top of that, the ordering has changed a tad &#8211; I wanted to start with the [...]]]></description>
			<content:encoded><![CDATA[<div class='series_toc'><h3>Series: CMS and Blog systems</h3><ol><li><a href='http://plind.dk/2009/10/24/comparing-cmsblog-systems-part-1-blog-installation/' title='Comparing CMS/blog systems, part 1: blog installation'>Comparing CMS/blog systems, part 1: blog installation</a></li><li><a href='http://plind.dk/2009/11/08/comparing-cmsblog-systems-part-2-cms-installation/' title='Comparing CMS/blog systems, part 2: CMS installation'>Comparing CMS/blog systems, part 2: CMS installation</a></li><li>Comparing CMS/blog systems, part 3.1: TYPO3 day to day</li></ol></div> <p>The individual posting on the blogs and cms&#8217; will be bigger, given that there&#8217;s simply more to do than for installing. Hence, I&#8217;ve decided to split the posts into smaller chunks, dealing with one product at a time. On top of that, the ordering has changed a tad &#8211; I wanted to start with the blogs again but as I&#8217;m working on a site for PL PHP and thought that I would do that in <a href="http://www.typo3.org/">Typo3</a>, it was a nobrainer to do this blog post alongside the new site. So, I&#8217;m reversing the order, taking the CMS systems first, then the blogs &#8211; one by one. Oh, and, just to completely change the idea, I&#8217;ve reverted to using PHP 5.2 instead of 5.3 &#8211; typo3 cannot handle 5.3 and some of the other systems weren&#8217;t too happy with it either, so to keep the list systems I&#8217;m using 5.2.</p>
<h2>Designing</h2>
<p>Before I started implementing the site in Typo3 I made a design for the site. I had a browse at <a href="http://www.oswd.org/">OSWD</a> (sadly inactive &#8211; it&#8217;s a great resource) and found a design that would work well for what I had in mind. I didn&#8217;t feel like just grabbing the design (a perfectly valid option) but wanted some minute changes &#8211; so I started out with GIMP, got some graphics together, then quickly mocked up an HTML template frame. Here&#8217;s a screenshot of what the site will look like:</p>
<p><img class="alignnone size-full wp-image-266" title="PL PHP site design" src="http://plind.dk/wp-content/uploads/2009/12/site.png" alt="PL PHP site design" width="495" height="212" /></p>
<p>In terms of HTML and CSS it&#8217;s a pretty easy layout, everything is wrapped in a div for easy styling and separation.</p>
<h2>Hands dirty</h2>
<p>So, with the HTML template in hand, I started with Typo3. Unfortunately, I didn&#8217;t have any proper docs on how to go about things, so I started off thinking that it would be easy to get a site working, that Typo3 must be setup to easily do what it&#8217;s meant to do, and that I would be able to google what I couldn&#8217;t figure out on my own. Quite a bit of time later I had learned that Typo3 necessitates fairly detailed docs, is not created with any defaults in mind, and generally makes tasks much more complex than they need be. There are many interesting and cool parts to the system, but they are hard to find for the uninitiated, it seems.</p>
<p>Instead of just ranting, time to show how I went about things. The first step, I thought, was that of making a template. Typo3 is a CMS: content management system. You manage content, displaying it within templates. So, of course, you make a template, then make some content, then display your content in templates, right? No. You cannot make templates in the system before you&#8217;ve created pages. So, step 1 is to create your first page in the system, then you can go on and make a template for that page.</p>
<p>So, having gotten this far, I then dived into creating my site template from scratch. Now, more seasoned Typo3 users/developers would probably stop here and ask: why didn&#8217;t you just install the TemplaVoila! extension? Or import your HTML template using the tools for that? Well, I wanted to learn how Typo3 actually works. Also, a system that only works if you add plugins/extensions is simply not a working system &#8211; it&#8217;s a skeleton with no functionality. That aside, getting started with TypoScript wasn&#8217;t hard in any way. The idea of the script is pretty straight forward, the syntax the same and if you look at some examples you should be able to pick up fundamentals fairly easy.</p>
<p>When starting with templates, you first create the template, give it a name and set options. You really only need to set the name to be able to edit it &#8211; but there is one other <strong>very important part</strong> to do, which unfortunately is not a default or even pointed out in the template creator. This important part is to include a static template that gives you access to content from pages and/or other places. Without this static template there&#8217;s a fair chance you&#8217;ll get nothing back when trying to insert content in your template. Now, there&#8217;s probably a good reason why one of the static templates giving you access to content isn&#8217;t by default included &#8211; it&#8217;s most likely because there are several templates that do so and the creators of Typo3 don&#8217;t want to make choices on behalf of users. Nonetheless, it seems to me that if you need one of these static templates in more than 66% of cases, then you at the very least make a big, fat, red arrow that points to this option. Normally, I&#8217;d think it best to include something by default if it&#8217;s used a lot, and then let people deselect it if it&#8217;s not used &#8211; unfortunately, that&#8217;s not really an option for Typo3, as some templates exclude others.</p>
<p>Cutting this short: if you&#8217;re making a site like me, styling it with CSS (i.e. no tables to position things) you most likely want to include the &#8216;css_styled_content&#8217; template. This then gives you access to content in pages through a simple TypoScript copy: element &lt; styles.content.get.</p>
<p>After setting up the basic stuff, you can go on to creating the template structure. This is done through mainly two parts of the template editor: constants and setup. Constants are, as the name implies, constants. These can be included in the setup, which is where the template is actually made. The upshot of this is that you can change a constant in one place and see changes in many, i.e. doing away with code duplication. Where this comes in handy is mainly when you&#8217;re using one template in many places &#8211; no need to change template code, you just set slightly different constants for each page.</p>
<p>My first try at creating my site template in Typo3 was fairly crude. It looked something like this:</p>
<pre>page = PAGE
page.bodyTag = &lt;body&gt;
page.stylesheet = fileadmin/styles/main.css

page {
  10 = HTML
  10.value = &lt;div id='main_frame'&gt;
  11 = HTML
  11.value = &lt;div id='header'&gt;
  12 = HTML
  12.value = &lt;div id='logo'&gt;
  13 = TEXT
  13.value = PL PHP
  13.wrap = &lt;div id='logo_text'&gt;|&lt;/div&gt;
  14 = HTML
  14.value = &lt;/div&gt;
... etc
}</pre>
<p>Yes, at first I only knew about three elements in TypoScript: PAGE, TEXT and HTML. I was pretty sure there was a better way to do what I wanted but I find it&#8217;s a better way to learn to first give things a try, then improve your first idea. So, using the above method I got most of the template working. I then took some time out to study TypoScript a bit more, learned about a few more elements and rewrote the template to:</p>
<pre>page = PAGE
page.bodyTag = &lt;body&gt;
page.stylesheet = fileadmin/styles/main.css

page {
 10 = COA
 10.wrap = &lt;div id="main_frame"&gt;|&lt;/div&gt;
 10 {
  10 = COA
  10.wrap = &lt;div id='header'&gt;|&lt;/div&gt;
  10 {
   10 = COA
   10.wrap = &lt;div id='logo'&gt;|&lt;/div&gt;
   10 {
    10 = TEXT
    10.value = &lt;a href='/'&gt;PL PHP&lt;/a&gt;
    10.wrap = &lt;div id='logo_text'&gt;|&lt;/div&gt;
   }
   20 = TEXT
   20.value =
   20.wrap = &lt;div id='menu'&gt;|&lt;/div&gt;
   30 = TEXT
   30.wrap = &lt;div class='float-clear'&gt;|&lt;/div&gt;
  }
  20 &lt; styles.content.get
  20.wrap = &lt;div id='content'&gt;|&lt;/div&gt;
  30 = TEXT
  30.value (
   &amp;copy; 2009 Peter Lind&lt;span class='splitter'&gt;&amp;nbsp;&lt;/span&gt;PL
   PHP&lt;span class='splitter'&gt;&amp;nbsp;&lt;/span&gt;
  )
  30.wrap = &lt;div id='footer'&gt;|&lt;/div&gt;
 }
}</pre>
<p>The advantage in the above should be clear: elements are no longer split &#8211; instead, elements are contained within each other as in the actual HTML.</p>
<p>TypoScript is basically a collection of objects that are typically modeled on HTML or PHP counterparts. The TEXT and HTML elements, for instance, resolve to text outputs &#8211; the difference between the two is that the properties you set on the TEXT element will be set on it&#8217;s stdWrap property (a TEXT element is close to being a stdWrap element) while the same doesn&#8217;t go for the HTML element. Will this affect you when starting out with Typo3? Not very likely &#8230;</p>
<p>Anyway, a quick run through: first, a PAGE element is declared. This represents the entire page (don&#8217;t confuse this with the page you created for the template. The only elements of the page created that will be inserted automatically into the template are those that affect the &lt;head&gt; &#8211; so, the PAGE element doesn&#8217;t import any content automatically) and you can set various properties such as stylesheet and bodyTag to make basic layout decisions. To get further structure to the template, you then need to add elements to the PAGE element. This is done in the above code with the HTML, TEXT and COA elements. The COA element is an array of cObjects &#8211; content objects. Better still, it allows you to wrap the contents as you wish &#8211; hence, you can see it as an HTML element that allows for a hierarchy (the HTML element cannot contain other elements).</p>
<p>Three other elements worth mentioning in the code are: first, the notation:</p>
<ul>
<li>= is simple assignment</li>
<li>&lt; means copy</li>
<li>=&lt; means reference (not used above)</li>
<li>&gt; means empty the element (not used above. Basic usage is if you&#8217;re using an element already declared)</li>
<li>{} serves to reduce typing. Left hand elements inside the block are treated as properties of the element to the left of the {</li>
<li>() serves to contain multiple lines. You cannot have anything to the right of the ( and you cannot have anything to the left or right of the )</li>
</ul>
<p>Secondly, the styles.content.get part. This refers, as one might guess from my rant above, to the included static template. If one was to use the template analyzer, one would see that css_styled_content appears as a template extension to the main template. In this extension styles.content.get is declared and it&#8217;s properties filled. In your own template you can then copy the contents of styles.content.get with &lt; &#8211; and the content defined in the page of the template will appear inside the template when rendered.</p>
<p>Lastly, as can be guessed from the numbering in the template, elements are rendered according to numerical position. That is, 10 is rendered before 20, which in turn is rendered before 30. Elements are resolved in full before later elements are resolved: 10.10 is resolved before 10.20, regardless of where 10.20 is declared.</p>
<p>Finally, to get the template working properly for the site, a menu is needed. This bit can cause a bit of confusion, mainly because the elements are more complex than other TypoScript elements. What&#8217;s needed is an HMENU element and then either TMENU or GMENU element &#8211; the first would be Text Menu, the second Graphical Menu. As I&#8217;m opting for a css based menu and handling most things myself, I opted for the TMENU. The menu ended up looking like this:</p>
<pre>10 = HMENU
10.entryLevel = 0
10 {
 1 = TMENU
 1 {
  NO {
   after = &lt;span class='splitter'&gt;&amp;nbsp;&lt;/span&gt;
  }
  ACT &lt; .NO
  ACT {
   ATagParams = class='active-menupoint'
  }
  ACT = 1
 }
}</pre>
<p>The HMENU gets things started. The entryLevel bit sets the start level of the menu to just root level (which, strangely, means that root level pages should NOT be included &#8211; entryLevel seems to mean &#8216;include things below this level&#8217;). The next part determines the layout of the following menus &#8211; which means that the numerical order here takes on a different sense than in the other rendering parts, as here each successive level describes a menu sublevel. Hence, HMENU.1 is menu level 1, HMENU.2 is menu level 2. For each menu level described, a number of properties must be set for them to render. For instance, the NO property of the TMENU element must be set for the menuitems to render.</p>
<p>Luckily, that&#8217;s about all it takes to get a menu going, no need to include templates or extensions &#8211; just have to use the proper elements, declare them properly and then have a proper page hierarchy (the reason I use &#8216;proper&#8217; so many times in a row is that I didn&#8217;t &#8230; chose to learn the hard way, I did).</p>
<p>Now, the templating part is done. It&#8217;s time to skip to content creating, which is much easier (or harder, depending upon how creative you are) in Typo3. The backend site includes an ok JavaScript rich text editor that will do all the typical formatting tricks of the day, so there&#8217;s not really much to say regarding that: it works and it works quite easy.</p>
<p>Then, to stick some icing on the cake, nice urls would be good. To achieve this, it&#8217;s necessary to install an extension and mess about with the .htaccess file in the main site folder. Going by the instructions for the <a href="http://typo3.org/documentation/document-library/extension-manuals/realurl/1.7.0/view/">Realurl extension</a> it&#8217;s not too bad though &#8211; compared to getting content displaying on the page in the first place it was actually a breeze. There is one pitfall to be aware of &#8211; you need to download the extension, then upload it to your site. The &#8216;discover&#8217; feature of Typo3 doesn&#8217;t work, it imports an old version of the extension instead of the newest one. Apart from that, the extension works pretty well soon as you have edited your template (the setup part needs three lines) and your .htaccess file &#8211; you can even specify custom names for pretty urls.</p>
<h2>Done</h2>
<p>Getting a basic site up and running to a point where I can look at it and say &#8220;that&#8217;s alright&#8221; took a lot longer than expected. Some parts of Typo3 are overly complex for no apparent reason. Others seem to work fine and don&#8217;t need any tweaking. The moral of the story seems to be that you shouldn&#8217;t go into Typo3 land without a map and a guide &#8211; you probably won&#8217;t find your way around.</p>
<p>Here&#8217;s the list of things I used to get by:</p>
<ul>
<li><a href="http://typo3.org/documentation/document-library/">Documentation at Typo3</a> &#8211; You can find tutorials, videos and more here. It could be a great wealth of info but unfortunately it&#8217;s not. A lot of the data is outdated, a lot of it is not detailed enough and a lot of it simply assumes to much of the reader. Still, you&#8217;ll find answers to some questions here.</li>
<li>The <a href="http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/current/">TSref</a> &#8211; documentation of TypoScript elements and other stuff. Beware of the examples: they seem to make points but generally don&#8217;t.</li>
<li><a href="http://www.amazon.co.uk/Typo3-Enterprise-Management-Rene-Fritz/dp/1904811418/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1260793050&amp;sr=8-1">Typo3 Enterprise Management</a> &#8211; probably the best guide you can find, although it&#8217;s a couple of years old.</li>
</ul>
<p>One thing I&#8217;m rather undecided about is the whole idea of TypoScript. I came across the idea that PHP frameworks are not just a bonus &#8211; they can be problematic as well. Rasmus Lerdorf <a href="http://toys.lerdorf.com/archives/38-The-no-framework-PHP-MVC-framework.html">voiced that idea and similar ones one</a> his blog a while ago: his point being that PHP in itself actually works as a framework and that if you stick a framework on top that, you&#8217;re distancing yourself from what you actually need. TypoScript gives you the same feeling: why has HTML been recreated in this way? Why not just allow actual HTML as templates and mix in some PHP? What are the problems solved with TypoScript? What do we gain from representing templates as TypoScripts? This concern is amplified by the fact that extensions/plugins have been developed to take your HTMLand turn it into a Typo3 template: if TypoScript solves my problems why was TemplaVoila! created?</p>
<p>Some positive sides to it should be visible: templates won&#8217;t be the typical mash of HTML and PHP &#8211; they&#8217;ll be a unique type that encompasses both. This might make it easier to do some PHP without knowing the language fully. It can also simply writing HTML as some things will be done for you. Still, I wonder: do we need another set of building blocks on top of HTML and PHP?</p>
 <div class='series_links'><a href='http://plind.dk/2009/11/08/comparing-cmsblog-systems-part-2-cms-installation/' title='Comparing CMS/blog systems, part 2: CMS installation'>Previous in series</a> </div>]]></content:encoded>
			<wfw:commentRss>http://plind.dk/2009/12/14/comparing-cmsblog-systems-part-3-1-typo3-day-to-day/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
