<?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>TYPO3-Addict &#187; Tutorial</title>
	<atom:link href="http://www.typo3-addict.com/tag/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.typo3-addict.com</link>
	<description>For those addicted to TYPO3</description>
	<lastBuildDate>Wed, 06 Jul 2011 08:08:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>TYPO3: How to use TypoScript Conditions</title>
		<link>http://www.typo3-addict.com/2009/11/typo3-how-to-use-typoscript-conditions/</link>
		<comments>http://www.typo3-addict.com/2009/11/typo3-how-to-use-typoscript-conditions/#comments</comments>
		<pubDate>Fri, 20 Nov 2009 10:10:23 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Conditions]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Typoscript]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=828</guid>
		<description><![CDATA[A TypoScript condition is a powerful and easy way of telling TYPO3 when to execute a piece of TypoScript. In this tutorial I&#8217;ll explain the basics of such a condition and how to use one. Conditions are very similar to a PHP if-statement and should be easy to use if you understand the principles of [...]]]></description>
			<content:encoded><![CDATA[<p>A TypoScript condition is a powerful and easy way of telling TYPO3 when to execute a piece of TypoScript. In this tutorial I&#8217;ll explain the basics of such a condition and how to use one. Conditions are very similar to a PHP if-statement and should be easy to use if you understand the principles of PHP if, elseif and else.</p>
<p><span id="more-828"></span>A condition always consists of 2 brackets with a statement in the middle:</p>
<pre>[your-statement]</pre>
<p>Multiple conditions can be combined by using so called operators: &amp;&amp; (AND) or || (OR), if no operator is defined the default will be OR.</p>
<p>Example 1: Load ie.css only when the browser is IE</p>
<pre>[browser = msie]
page.includeCSS {
   1 = fileadmin/ie.css
}
[end]</pre>
<p>Example 2: Load ie6.css only when the browser is IE and the version is lower than 7</p>
<pre>[browser = msie] &amp;&amp; [version = &lt;7]
page.includeCSS {
   1 = fileadmin/ie6.css
}
[end]</pre>
<p>Example 3: Load ie stylesheet when the browser is IE, load normal stylesheet with all other browsers</p>
<pre>[browser = msie] &amp;&amp; [version = &lt;7]
page.includeCSS {
   1 = fileadmin/ie.css
}
[else]
page.includeCSS {
   1 = fileadmin/style.css
}
[end]</pre>
<p>Example 4: Use the time to accordingly greet your visitor</p>
<pre># Display 'Good Morning before 12 o'clock
[hour =&lt; 12]
lib.greeting = TEXT
lib.greeting {
    value = Good Morning!
}
[else]
# Display 'Good Day' after 12 o'clock
lib.greeting = TEXT
lib.greeting {
    value = Good Day!
}
[end]</pre>
<p>Let&#8217;s make things a little bit more interesting.</p>
<p>Example 5: We want to include some records (from page id 250) in our left_column div but only on page id 100 or a subpage of this page!</p>
<pre># First we define the content of the 'left_column' div:
left_column = COA
left_column {
   10 &lt; lib.regularContent
   20 &lt; lib.specialContent
}

# Display the lib.specialContent only on page id 100 or a subpage
[PIDinRootline = 100]
lib.specialContent = CONTENT
lib.specialContent {
   table = tt_content
   select {
      pidInList = 250
      orderBy = sorting
      languageField = sys_language_uid
   }
}
[end]</pre>
<p>I could make a hundred examples but when you know to basics it isn&#8217;t that hard. If you want to know more about these conditions please read chapter 4 of the TSRef:<br />
<a title="TypoScript Conditions" href="http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/4/1/">http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/4/1/</a></p>
<p>If you have any questions don&#8217;t hesitate to ask!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2009/11/typo3-how-to-use-typoscript-conditions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TYPO3: Using the localization overview</title>
		<link>http://www.typo3-addict.com/2009/11/typo3-using-the-localization-overview/</link>
		<comments>http://www.typo3-addict.com/2009/11/typo3-using-the-localization-overview/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 08:01:16 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Translations]]></category>
		<category><![CDATA[Localization]]></category>
		<category><![CDATA[Translation]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=741</guid>
		<description><![CDATA[Translating pages can be a real pain. Personally I think the worst thing is the amount of clicks in takes when you need to translate a whole pagetree! Translating 10 pages can take up to 45 clicks through the List module! Can&#8217;t this be easier? Yes it can! TYPO3 by default comes with a Localization [...]]]></description>
			<content:encoded><![CDATA[<p>Translating pages can be a real pain. Personally I think the worst thing is the amount of clicks in takes when you need to translate a whole pagetree! Translating 10 pages can take up to 45 clicks through the List module! Can&#8217;t this be easier? Yes it can! TYPO3 by default comes with a Localization Overview module and can help to reduce the amount of clicks from 45 (or even more with more pages) to about 7!</p>
<p><span id="more-741"></span>In this tutorial I&#8217;m assuming you already have a website. You also need 2 or more languages. In this case we have our default language (English) with two other languages (Dutch and German). If you do not have these languages you might want to make them first, else the tutorial won&#8217;t be correct. To check your languages go to the List module, click on the root (world-icon) of the TYPO3 installation and see if there are &#8216;Website Languages&#8217;. (See screenshot 1)</p>
<p style="text-align: left;">
<div id="attachment_743" class="wp-caption aligncenter" style="width: 595px"><a href="http://www.typo3-addict.com/wp-content/uploads/2009/10/typo3_localization_1.jpg"><img class="size-large wp-image-743 " title="typo3_localization_1" src="http://www.typo3-addict.com/wp-content/uploads/2009/10/typo3_localization_1-1024x364.jpg" alt="Click to enlarge!" width="585" /></a><p class="wp-caption-text">Screenshot 1. Click to enlarge!</p></div>
<p>Got your languages? Good! Now where can we find this wonderful module? The Localization Overview module can be found within the Info module.</p>
<pre>1. Go to the Info module in the left main menu.
2. Select the rootpage of your website.
3. Select 'Localization Overview' from the top dropdown menu.</pre>
<p>You&#8217;ll now see an overview of your pages with the default language pagetitles, and perhaps the pagetitle you already translated.</p>
<p style="text-align: left;">
<div id="attachment_744" class="wp-caption aligncenter" style="width: 595px"><a href="http://www.typo3-addict.com/wp-content/uploads/2009/10/typo3_localization_2.jpg"><img class="size-large wp-image-744 " title="typo3_localization_2" src="http://www.typo3-addict.com/wp-content/uploads/2009/10/typo3_localization_2-1024x364.jpg" alt="Screenshot 2. Click to enlarge!" width="585" /></a><p class="wp-caption-text">Screenshot 2. Click to enlarge!</p></div>
<p style="text-align: left;">As you can see in the screenshot column 3 and 4 are the Dutch and German pagetitles and still empty. To translate the default pages into a new language we now check all pages we want to translate and hit the &#8216;Create new translation headers&#8217; button. This way we can translate all pages in 1 screen!</p>
<p style="text-align: left;">
<div id="attachment_747" class="wp-caption aligncenter" style="width: 595px"><a href="http://www.typo3-addict.com/wp-content/uploads/2009/10/typo3_localization_3.jpg"><img class="size-large wp-image-747 " title="typo3_localization_3" src="http://www.typo3-addict.com/wp-content/uploads/2009/10/typo3_localization_3-1024x364.jpg" alt="Screenshot 3. Click to enlarge!" width="585" /></a><p class="wp-caption-text">Screenshot 3. Click to enlarge!</p></div>
<p>The edit screen allows you to insert a new pagetitle for the (in this case Dutch) language. You can also hide the page of choose a different language you want to translate but these options aren&#8217;t relevant in this tutorial. Once you&#8217;ve inserted all your new pagetitles save the page.</p>
<pre><strong>Beware</strong> that your TYPO3 login expires by default after 1 hour!
This should be no problem with TYPO3 4.x but it doesn't hurt to
save regularly when inserting many new pagetitle! Better to save
3 times than ending up expired and start all over again...</pre>
<p>Once your done and saved the page you&#8217;ll return to the Localization Overview page. I would recommend inserting 1 language at a time, this way you don&#8217;t need to keep switching languages in you head or make sure you enter the right language into the right field.</p>
<p style="text-align: left;">
<div id="attachment_750" class="wp-caption aligncenter" style="width: 595px"><a href="http://www.typo3-addict.com/wp-content/uploads/2009/10/typo3_localization_4.jpg"><img class="size-large wp-image-750 " title="typo3_localization_4" src="http://www.typo3-addict.com/wp-content/uploads/2009/10/typo3_localization_4-1024x364.jpg" alt="Screenshot 4. Click to enlarge!" width="585" /></a><p class="wp-caption-text">Screenshot 4. Click to enlarge!</p></div>
<p>I hope this tutorial was clear and helpful. If you have any questions don’t hesitate to ask.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2009/11/typo3-using-the-localization-overview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TYPO3: 301 redirect pages or tt_news records</title>
		<link>http://www.typo3-addict.com/2009/11/tt_news-pages-301-redirect/</link>
		<comments>http://www.typo3-addict.com/2009/11/tt_news-pages-301-redirect/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 08:14:42 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[tt_news]]></category>
		<category><![CDATA[Tutorial]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=672</guid>
		<description><![CDATA[I&#8217;m getting a lot of traffic lately of people searching for a tutorial on 301 redirects, especially in combination with tt_news. Therefore I&#8217;m going to explain how to make such a redirect the easiest way. In this tutorial I&#8217;m assuming you already have a website up and running with RealURL installed and you want to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m getting a lot of traffic lately of people searching for a tutorial on 301 redirects, especially in combination with tt_news. Therefore I&#8217;m going to explain how to make such a redirect the easiest way. In this tutorial I&#8217;m assuming you already have a website up and running with RealURL installed and you want to setup a 301 redirect for a page or news record which no longer exist.</p>
<p><span id="more-672"></span></p>
<pre>Note: If you don't know anything about a 301 redirect
please read the grey box at the bottom of the article!</pre>
<h4>Redirecting a page using 301</h4>
<p>In this tutorial we have 2 pages: a news list page and a news single page</p>
<pre>http://www.your-website.com/old-news-page/

http://www.your-website.com/news/</pre>
<p>Now, since both page 1 and 2 are well indexed in Google and there are several inbound links we don&#8217;t want to delete either of them.  Yet the first news item had become obsolete and we want to redirect all these inbound links to another page.</p>
<p>If we delete the first page the visitor will end up with a 404 page. A 301 redirect could redirect the first pages to another page, and this is Google friendly too! So&#8230; how to do this?</p>
<pre>1. In the backend, go the 'info' module in the left main menu.
2. Select the rootpage of your website.
3. Choose "Speaking Url Management" from the dropdown menu.
4. Choose "Error log" from the second dropdown menu.</pre>
<p>You should now see a list of url errors:</p>
<p style="text-align: center;">
<div id="attachment_688" class="wp-caption aligncenter" style="width: 595px"><a href="http://www.typo3-addict.com/wp-content/uploads/2009/10/error_log.jpg"><img class="size-large wp-image-688 " title="error_log" src="http://www.typo3-addict.com/wp-content/uploads/2009/10/error_log-1024x348.jpg" alt="Click to enlarge!" width="585" /></a><p class="wp-caption-text">Click to enlarge!</p></div>
<p>It seems the page &#8216;old-news-page&#8217; has been requested by a visitor but could not be found. To make sure this won&#8217;t happen again we are going to redirect this page to our new page: &#8216;news&#8217;. As you can see, there&#8217;s a little button called &#8216;set as redirect&#8217;. Click this button to set the redirect for this url. You should now see the following screen:</p>
<p style="text-align: left;">
<div id="attachment_689" class="wp-caption aligncenter" style="width: 595px"><a href="http://www.typo3-addict.com/wp-content/uploads/2009/10/make_301_redirect.jpg"><img class="size-large wp-image-689 " title="make_301_redirect" src="http://www.typo3-addict.com/wp-content/uploads/2009/10/make_301_redirect-1024x348.jpg" alt="Click to enlarge!" width="585" /></a><p class="wp-caption-text">Click to enlarge!</p></div>
<p style="text-align: left;">In the screenshot above I&#8217;m redirecting the page &#8216;old-news-page&#8217; to the new page: &#8216;news&#8217;. As you can see I activate the &#8216;Send &#8220;301 Moved permanently&#8221; header&#8217; checkbox. Now TYPO3 will make the redirect a 301 redirect!</p>
<pre>1. Set the old url (this way it's set automatically)
2. Set the new page
3. Save the redirect
4. Go to <a href="http://www.your-website.com/old-news-page/">http://www.your-website.com/old-news-page/</a>
5. TYPO3 will redirect you to <a href="http://www.your-website.com/news/">http://www.your-website.com/news/</a>
6. Redirect succesful!</pre>
<p>Now let&#8217;s see how we can make this work for tt_news!</p>
<h4>Redirecting a tt_news record using 301</h4>
<p>When you delete a news record and try to visit it you&#8217;ll end up with a &#8216;no news id&#8217; error. The RealURL Management Error Log does not register this error! So, we need to manually set the redirect.</p>
<p>In this case we have 2 news records:</p>
<pre>http://dev.emaux.nl/news/news-single/article/example-news-record/

http://dev.emaux.nl/news/news-single/article/new-news-record/</pre>
<p>To redirect news record 1 to news record 2, please follow the following steps:</p>
<pre>1. In the backend, go the 'info' module again.
2. Select the rootpage of your website.
3. Choose "Speaking Url Management" from the dropdown menu.
4. Choose "Redirects" from the second dropdown menu.

We're back at the second screenshot above!

5. Click '+ New entry'
6. Set the url which no longer exists
7. Set the new url to which you want to redirect
8. Check the 301 checkbox
9. Save and enjoy!</pre>
<div id="attachment_692" class="wp-caption aligncenter" style="width: 595px"><a href="http://www.typo3-addict.com/wp-content/uploads/2009/10/Schermafbeelding-2009-10-30-om-13.37.35.png"><img class="size-large wp-image-692 " title="tt_news redirect 301" src="http://www.typo3-addict.com/wp-content/uploads/2009/10/Schermafbeelding-2009-10-30-om-13.37.35-1024x348.png" alt="Click to enlarge!" width="585" /></a><p class="wp-caption-text">Click to enlarge!</p></div>
<p>That&#8217;s it, your done! Repeat this procedure for all news items you delete. Hope this tutorial was clear and helpful. If you have any questions don&#8217;t hesitate to ask.</p>
<h4>What is a 301 redirect?</h4>
<pre>A 301 redirect is a redirect which uses a 301 http-header code.
This code tells search engines the page is no longer available
at the given location but is 'permanently moved' to another
location. The resource (e.g. search engine) should use the new
URL in the future instead of the old URL. In real life this would
mean the old page should be replaced by the new page upon
re-indexing.

This is a good thing! Now the search enige realizes the old page
doesn't contain the information which is being looked for. The
new page does, so your pageranking is preserved. A win-win
situation: We happy (pageranking preserved), seach engine happy
(page contains good information) and visitor happy (finds the
information it's looking for).</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2009/11/tt_news-pages-301-redirect/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

