<?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; Snippets</title>
	<atom:link href="http://www.typo3-addict.com/category/snippets/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.typo3-addict.com</link>
	<description>For those addicted to TYPO3</description>
	<lastBuildDate>Wed, 02 Jun 2010 13:03:58 +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: Click and Enlarge in RTE tt_news</title>
		<link>http://www.typo3-addict.com/2010/06/typo3-click-and-enlarge-in-rte-tt_news/</link>
		<comments>http://www.typo3-addict.com/2010/06/typo3-click-and-enlarge-in-rte-tt_news/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 12:55:32 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[RTE]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[tt_news]]></category>
		<category><![CDATA[Typoscript]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=990</guid>
		<description><![CDATA[I needed an image in the RTE to support the &#8216;click and enlarge&#8217; option in tt_news. Now, I used Google to find a solution but no luck, although it seems I&#8217;m not the only one trying to make this work. Looks like this isn&#8217;t as easy as it would sound.. Read more for the solution! [...]]]></description>
			<content:encoded><![CDATA[<p>I needed an image in the RTE to support the &#8216;click and enlarge&#8217; option in tt_news. Now, I used Google to find a solution but no luck, although it seems I&#8217;m not the only one trying to make this work. Looks like this isn&#8217;t as easy as it would sound..</p>
<p>Read more for the solution!</p>
<p><span id="more-990"></span></p>
<p><strong>How to set the click and enlarge option for the RTE in tt_news:</strong></p>
<p>Step 1:<br />
Include the static template: Clickenlarge Rendering (rtehtmlarea)</p>
<p>Now the click and enlarge rendering should work for normal content elements, but still no result for tt_news.</p>
<p>Step 2:<br />
Add the following TypoScript to your setup:</p>
<pre>
# Rendering RTE tt_news. Use the normal RTE parseFunc
# configuration for tt_news rte content
plugin.tt_news {
        general_stdWrap {
   	      parseFunc < tt_content.text.20.parseFunc
        }
}
</pre>
<p>Your Done :)</p>
<p>It turns out tt_news uses another way of rendering the RTE, so this should be reversed.</p>
<p>Update: It seems this snippet is actually part of the tt_news static template but out-commented... makes me wonder why?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2010/06/typo3-click-and-enlarge-in-rte-tt_news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TYPO3: Hide records from static_info_tables in the rootpage</title>
		<link>http://www.typo3-addict.com/2010/05/hide-records-from-static_info_tables-in-the-rootpage/</link>
		<comments>http://www.typo3-addict.com/2010/05/hide-records-from-static_info_tables-in-the-rootpage/#comments</comments>
		<pubDate>Wed, 05 May 2010 08:50:26 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[TSConfig]]></category>
		<category><![CDATA[Configuration]]></category>

		<guid isPermaLink="false">http://blog.mmwebdesign.eu/?p=70</guid>
		<description><![CDATA[After you installed static_info_tables in your TYPO3 installtion, you get a whole bunch of records displayed in the rootpage. This really slows down the page, which isn&#8217;t funny when you work a lot with usergroups. You can hide all of these records with a simple line in your BE-User-TSConfig. Insert the following User TSConfig into [...]]]></description>
			<content:encoded><![CDATA[<p>After you installed static_info_tables in your TYPO3 installtion, you get a whole bunch of records displayed in the rootpage. This really slows down the page, which isn&#8217;t funny when you work a lot with usergroups. You can hide all of these records with a simple line in your BE-User-TSConfig.<span id="more-70"></span></p>
<p>Insert the following User TSConfig into your own userrecord or in the usergroup to which you belong (i.e. Admins).</p>
<pre>mod.web_list.hideTables=static_template, static_countries,
static_country_zones, static_currencies, static_languages,
static_territories, static_taxes, static_markets</pre>
<p><strong>IMPORTANT:</strong><br />
I had to use spaces in the code above in order to display it right. DON&#8217;T use them in your TSConfig!</p>
<p><!-- .googleAdsenseTop {  display: none; } --></p>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2010/05/hide-records-from-static_info_tables-in-the-rootpage/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TYPO3: Create a custom header layout</title>
		<link>http://www.typo3-addict.com/2010/03/a-custom-header-layout/</link>
		<comments>http://www.typo3-addict.com/2010/03/a-custom-header-layout/#comments</comments>
		<pubDate>Fri, 05 Mar 2010 09:17:32 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Headers]]></category>
		<category><![CDATA[Typoscript]]></category>

		<guid isPermaLink="false">http://www.typo-addict.com/?p=365</guid>
		<description><![CDATA[By default, TYPO3 has five default header layouts from which to choose. Each correspond to the H1 to H5 tags. With this TypoScript snippet you can adjust one of them and set it to your own needs. For example a header with a date attached to it. This way you can make a header like: [...]]]></description>
			<content:encoded><![CDATA[<p>By default, TYPO3 has five default header layouts from which to choose. Each correspond to the H1 to H5 tags. With this TypoScript snippet you can adjust one of them and set it to your own needs. For example a header with a date attached to it. This way you can make a header like: Latest news of {date}. Or what about: Welcome back {username}?</p>
<p><span id="more-365"></span></p>
<h4>A header with a date attached:</h4>
<pre># Overwrite layout 5
# Create an array of objects
lib.stdheader.10.5 = COA
lib.stdheader.10.5 {
   # First object is a copy of the default header layout 1,
   # so the basic input is printed. (e.g. the field 'header')
   10 &lt; lib.stdheader.10.1
   10.fontTag = &lt;h2{register:headerStyle}{register:headerClass}&gt;|

   # Second object: The date which we want to be appended.
   20 = TEXT
   20 {
      data = date:U
      strftime = %A %e %B
   }

   # Third object: Closing the H2 tag which we opened
   # in the first object.
   30 = TEXT
   30.value = &lt;/h2&gt;
}</pre>
<h4>A header with the username</h4>
<pre># Overwrite layout 5
# Create an array of objects
lib.stdheader.10.5 = COA
lib.stdheader.10.5 {
   # First object is a copy of the default header layout 1,
   # so the basic input is printed. (e.g. the field 'header')
   10 &lt; lib.stdheader.10.1
   10.fontTag = &lt;h2{register:headerStyle}{register:headerClass}&gt;|

   # Second object: insert the username.
   20 = TEXT
   20.value = {TSFE:fe_user|user|name}
   20.insertData = 1

   # Third object: Closing the H2 tag which we opened
   # in the first object.
   30 = TEXT
   30.value = &lt;/h2&gt;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2010/03/a-custom-header-layout/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TYPO3: A multiple line graphical header</title>
		<link>http://www.typo3-addict.com/2010/01/typo3-a-multiple-line-graphical-header/</link>
		<comments>http://www.typo3-addict.com/2010/01/typo3-a-multiple-line-graphical-header/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 19:01:32 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[GIFBUILDER]]></category>
		<category><![CDATA[Headers]]></category>
		<category><![CDATA[Typoscript]]></category>
		<category><![CDATA[Web design]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=855</guid>
		<description><![CDATA[Graphical headers can be just that little extra thing your design needs. Luckily TYPO3 can manage this pretty well using the GIFBUILDER. But what if you have a long headertext? What if you need the headertext to display over more than just one line? GIFBUILDER can&#8217;t actually read your headertext so there&#8217;s no way it [...]]]></description>
			<content:encoded><![CDATA[<p>Graphical headers can be just that little extra thing your design needs. Luckily TYPO3 can manage this pretty well using the GIFBUILDER. But what if you have a long headertext? What if you need the headertext to display over more than just one line?</p>
<p>GIFBUILDER can&#8217;t actually read your headertext so there&#8217;s no way it can determine when to use multiple lines by itself (at least, not without making weird cuts in the middle of your words). Therefore, we need to tell GIFBUILDER when to break the line.</p>
<p><span id="more-855"></span>Since we only use one H1 tag per seo, this snippet modifies the second header layout.</p>
<pre># Start overriding the second header layout.
lib.stdheader.10.2 &gt;
lib.stdheader.10.2 = COA
lib.stdheader.10.2 {
  # Wrap the whole header
  wrap = &lt;div&gt;|&lt;/div&gt;
  10 = IMAGE
  10 {
     # Wrap the first line
     wrap = &lt;div&gt;|&lt;/div&gt;
     file = GIFBUILDER
     file {
        XY = [10.w] + 4, [10.h] + 8
        backColor = #FFFFFF
        10 = TEXT
        10 {
           text.field = header
           # Set the fontfile and font-properties.
           fontFile = fileadmin/fonts/customfont.ttf
           fontSize = 22
           fontColor = #000000
           offset = 0,18
           # Select the first line of our sentence.
           text.listNum = 0
           # Here we determine the break, in this case a pipe (|).
           text.listNum.splitChar = |
        }
     }
  }
  # Check if the second line is there...
  20 = COA
  20.if {
     value.field = header
     isTrue.cObject = TEXT
     isTrue.cObject.field = header
     # The second line starts after the pipe
     isTrue.cObject.listNum.splitChar = |
     # Now use the second line of our sentence
     isTrue.cObject.listNum = 1
  }
  # If the second line is there, use the same markup
  20.10 &lt; .10
  20.10 {
     file {
        10.text.listNum = 1
        10.text.listNum.splitChar = |
     }
  }
}
</pre>
<p>Just to be clear: A header with two lines would now be like:<br />
This is a very long header which will | be displayed over two lines.</p>
<p><a href="http://www.typo3-addict.com/wp-content/uploads/2010/01/header_entry.png"><img class="size-full wp-image-871 alignnone" title="header_entry" src="http://www.typo3-addict.com/wp-content/uploads/2010/01/header_entry.png" alt="" width="552" height="52" /></a></p>
<p>Result:</p>
<p><a href="http://www.typo3-addict.com/wp-content/uploads/2010/01/result.png"><img class="size-full wp-image-872 alignnone" title="result" src="http://www.typo3-addict.com/wp-content/uploads/2010/01/result.png" alt="" width="418" height="115" /></a></p>
<p>The pipe will be the place where you split the header. Ofcourse, all the font properties used in the first line are also available in the second line, so play all you like with different fonts and markup on every other line.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2010/01/typo3-a-multiple-line-graphical-header/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<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: 5 things about tt_news</title>
		<link>http://www.typo3-addict.com/2009/10/5-things-you-should-know-about-tt_news/</link>
		<comments>http://www.typo3-addict.com/2009/10/5-things-you-should-know-about-tt_news/#comments</comments>
		<pubDate>Fri, 16 Oct 2009 07:32:22 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[GIFBUILDER]]></category>
		<category><![CDATA[tt_news]]></category>
		<category><![CDATA[Typoscript]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=610</guid>
		<description><![CDATA[In this post I'll show you 5 things about tt_news which might be nice to know about tt_news. We discuss a better pagebrowser, loading tt_news without cache and making images perfectly square by generating them automatically.]]></description>
			<content:encoded><![CDATA[<p>The tt_news extension is the most popular extension of TYPO3. No wonder, since it&#8217;s very flexible and can be used for much more than just handling newsitems. In this post I&#8217;ll show you 5 things about tt_news which might be nice to know about tt_news.</p>
<h4>1) A better pagebrowser</h4>
<p>By default, the tt_news pagebrowser is not very nice. Nor can it be easily styled. Inside tt_news there&#8217;s a &#8216;hidden&#8217; pagebrowser which is better, and much more flexible. To activate this better pagebrowser put the following into your template Setup section:<br />
<span id="more-610"></span></p>
<pre>#-----------------------------------
# A better tt_news pagebrowser
#-----------------------------------

plugin.tt_news {
  usePiBasePagebrowser = 1     # This activates the better pagebrowser
  pageBrowser {                # Here you can configure the better pagebrowser
    maxPages = 7                  # Maximum browserpage links
    showResultCount = 1           # Display the sentence: ** till ** out of ** messages
    showRange = 1                 # Will look like "Items: <span style="text-decoration: underline;">1-5</span> <span style="text-decoration: underline;">6-10</span>" instead of "Page <span style="text-decoration: underline;">1</span> <span style="text-decoration: underline;">2</span> <span style="text-decoration: underline;">3</span> <span style="text-decoration: underline;">4</span>"
    showPBrowserText = 0          # Prepends "<span style="text-decoration: underline;">1</span> <span style="text-decoration: underline;">2</span> <span style="text-decoration: underline;">3</span>" like "<span style="text-decoration: underline;">page 1</span> <span style="text-decoration: underline;">page 2</span> <span style="text-decoration: underline;">page 3</span>", only when showRange = 0
    dontLinkActivePage = 1        # No need to link the active page
    showFirstLast = 0             # Show a first / last link, 0 since there already is a previous / next link.
  }
}

#-----------------------------------
# Locallang for the tt_news pagebrowser
#-----------------------------------

plugin.tt_news {
  _LOCAL_LANG.default {
    pi_list_browseresults_displays = Newsitem ###FROM### till ###TO### out of ###OUT_OF### newsitems.
    pi_list_browseresults_first = First page
    pi_list_browseresults_last = Last page
    pi_list_browseresults_page = Page
    pi_list_browseresults_prev = &lt; Previous
    pi_list_browseresults_next = Next &gt;
  }
}</pre>
<h4>2) Do not display duplicate items</h4>
<p>If you have more than one tt_news plugin on your page, this can be nice. For example: The first plugin only shows the last newsitem, the second plugin the 5 most recent newsitems. The most recent newsitem is now shown by both the plugins. You can tell tt_news to only show newsitems once. This only works for List mode plugins. Put the following lines into your template Setup section:</p>
<pre>#-----------------------------------
# Only show newsitems once per page.
#-----------------------------------

plugin.tt_news {
  excludeAlreadyDisplayedNews = 1
}</pre>
<p>If &#8220;excludeAlreadyDisplayedNews&#8221; is enabled &#8220;excludeLatestFromList&#8221; and &#8220;listStartId&#8221; will be ignored. This is no problem, since both these fields are deprecated. Be aware this might break your archive links.</p>
<h4>3) Generate a tt_news image automatically when no image is available</h4>
<p>If your template design forces you to upload a photo with every newsitem, this can be helpful. The following code will generate a &#8220;No image&#8221; image using GIFBUILDER. Put this code in your template Setup section:</p>
<pre>#-----------------------------------
# Generate a tt_news image automatically when no image is available.
# In this snippet: Latest mode
#-----------------------------------

plugin.tt_news.displayLatest.image.noImage_stdWrap {
  cObject = IMAGE
  cObject {
    # Wrap the image with a div tag
    wrap = &lt;div&gt;|&lt;/div&gt;
    # Use GIFBUILDER to create an image
    file = GIFBUILDER
    file {
      # Define the width and height of the image.
      XY = 125,125
      # Define the background color of the image.
      backColor = #FFFFFF

      # First object in the image: TEXT
      10 = TEXT
      10 {
        # The actual text which is displayed in the image
        text = No image available
        # The fontsize
        fontSize = 16
        # niceText to make the text more natural. This can be good or bad depending on your server configuration.
        niceText = 1
        # Color of the text
        fontColor = #000000
        # Coordinates where your text should appear in the image. Width / Height
        offset = 125/2-32,125/2+4
      }
    }
  }
}</pre>
<h4>4) Load tt_news without cache; for example random news.</h4>
<p>If you want to display newsrecords random, set the viewmode to LIST or LATEST and set the &#8217;order by&#8217; field to &#8216;randomise order&#8217;. The tricky part here is that your plugin shouldn&#8217;t be cached, since that would destroy the whole random idea. Ofcourse you can set the whole page to &#8216;no cache&#8217; but this would kill your performance. Better is to just tell tt_news to use no cache. It will still cost you some performance but, it&#8217;s better than not caching the whole page. To setup tt_news without cache put the following code  into your template Setup section:</p>
<pre>#-----------------------------------
# Run tt_news without cache, remember to unset in deeper levels!
#-----------------------------------

plugin.tt_news = USER_INT</pre>
<p>This will load the tt_news plugin as a USER_INT object and render it without cache, outside of the main pagerendering. This way your page will be called from cache but the plugin will be non-cached. Just be sure to un-set this rendering on a deeper pagelevel since TypoScript is inherited from levels above.</p>
<h4>5) Perfectly square tt_news images.</h4>
<p>By default tt_news allows you to set the maximum width and height for an image in LIST or LATEST mode. Width and height are adjusted automatically when one exceeds the other. But what if you want a perfectly square image no matter what photo is being uploaded? CSS seems to be the only way to do this but there&#8217;s a solution which is better..</p>
<p>Ever noticed TYPO3 is able to crop images as soon as resizing isn&#8217;t posible anymore? An example: we have an image of 400 x 300 pixels, we want a picture of 30 x 30. What it does is it resizes the image to 40 x 30 pixels and than crops the width to 30 pixels. But that&#8217;s TYPO3.. not tt_news.</p>
<p>To enable this for tt_news you need to put the following code into your tempate Setup section:</p>
<pre>#-----------------------------------
# Generate a perfectly square tt_news image.
# In this snippet: Latest mode
#-----------------------------------

plugin.tt_news {
    # This only affects the LATEST mode, to use LIST mode change to 'displayList'
    displayLatest {
        # Unset the default tt_news maximum width and height parameter
        image.file.maxW &gt;
        image.file.maxH &gt;
        # Call the TYPO3 way to render images, setting it to 90 pixels; cropping mode (c)
        image.file.width  = 90c
        image.file.height = 90c
        # Make the images SEO, using the caption as Alt tag.
        image.altText.field = imagecaption
    }
}</pre>
<p>Now, the image will be resized untill the given width or height is reached and than be cropped. Width and height are always in pixels so there is no need to append &#8216;px&#8217;. The &#8216;c&#8217; tells TYPO3 to crop the image.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2009/10/5-things-you-should-know-about-tt_news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TYPO3 SEO: The Basics&#8230;</title>
		<link>http://www.typo3-addict.com/2009/10/typo3-seo-the-basics/</link>
		<comments>http://www.typo3-addict.com/2009/10/typo3-seo-the-basics/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 12:10:19 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[Configuration]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Sourcecode]]></category>
		<category><![CDATA[Typoscript]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=556</guid>
		<description><![CDATA[In this post I'm going to show you some basics of SEO in TYPO3, I will explain how you can easily handle SEO stuff within TYPO3. This is not a "best practise" nor is it a tutorial on how SEO works. But if you're new to TYPO3, or SEO in TYPO3 you'll find some useful things here.]]></description>
			<content:encoded><![CDATA[<p>In this post I&#8217;m going to show you some basics of SEO in TYPO3, I will explain how you can easily handle SEO stuff within TYPO3. This is not a &#8220;best practise&#8221; nor is it a tutorial on how SEO works. But if you&#8217;re new to TYPO3, or SEO in TYPO3 you&#8217;ll find some useful things here.</p>
<h4>Basic no. 1: A clean source code.</h4>
<p>A clean source code makes it easier for search engines to crawl your website. For that, you need to clean up the default HTML output done by TYPO3. Use this line of TypoScript a put it in your template Setup section:<span id="more-556"></span></p>
<pre># Clean up prefixes in source code
config.disablePrefixComment = 1</pre>
<p>This will clean up the prefixes made with every content-element. This should be a relief! For a more complete cleanup please <a title="Clean up your sourcecode!" href="http://www.typo3-addict.com/2009/02/updated-cleanup-your-fe-sourcecode/">go to this post</a>.</p>
<h4>Basic no. 2: Make you headers better.</h4>
<p>By default, every content-element header is a &lt;h1&gt; header in TYPO3. For your SEO it&#8217;s better to just have one &lt;h1&gt; tag per page. To convert all these &lt;h1&gt; tags into &lt;h2&gt; tags you need to put the following line in your template Constants section:</p>
<pre># Convert default H1 tags into H2 tags
content.defaultHeaderType = 2</pre>
<p>You can now add a &lt;h1&gt; tag manually to the page, or generate one dynamically using TypoScript.</p>
<h4>Basic no. 3: Images.</h4>
<p>By default, images which are scaled, croped or in any other way modified by TYPO3 are given a random name. For example:</p>
<pre>/typo3temp/pics/b3e43c4bb3.jpg.</pre>
<p>By installing the extension: <a title="Nicer image names" href="http://typo3.org/extensions/repository/view/fl_realurl_image/current/">fl_realurl_image</a>, your images will get a nicer name. Install the extension and you&#8217;re done. Images will now be named like:</p>
<pre>/typo3temp/fl_realurl_image/your_image.jpg</pre>
<h4>Basic no. 4: Page title.</h4>
<p>The pagetitle is important for your SEO ranking. This title needs to summerize the pagecontent as close as posible. I suggest you manually edit these to your needs. Someone (can&#8217;t rememer the name, sorry) once told me: Use an inverted breadcrumb path as a pagetitle. The theory behind this: People think about their page names, the lower in the pagetree the more specific. If you invert this you have a pretty close to content path and also the main keywords which people interested in this subject will search for.</p>
<h4>Basic no. 5: URL&#8217;s.</h4>
<p>The default URL&#8217;s of TYPO3 are not readable, the solution to this problem is RealURL. Since this extension is really popular I&#8217;m not going to explain it, this has been done more than enough times. Just search the web for a good tutorial. I can recommend the extension &#8220;danp_realurlconfigurator&#8221; though, which gives you a nice configurator.</p>
<h4>Basic no. 6: Description and meta tags.</h4>
<p>A really important SEO rule is to have unique page descriptions and meta tags. Since these fields have to match the page content as close as posible it&#8217;s only logical to have them in your page configuration. If you edit your page you&#8217;ll find the second tab is all about meta data. Here you can fill in the description and meta tags for your page. To actually use these field in the frontend source code you&#8217;ll need to following lines in your template Setup section:</p>
<pre># This will activate the page meta data
page.meta.keywords.field = keywords
page.meta.description.field = description</pre>
<h4>Basic no. 7: An XML sitemap for Google Webmaster Center.</h4>
<p>If you want Google to track your page changes and crawl them accordingly you can submit a XML sitemap. If you do not know what a XML sitemap is <a title="Google Sitemaps" href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;answer=82300">please read this first</a>. There are a couple of extensions to generate such a sitemap dynamically in TYPO3.</p>
<h4>Basic no. 8: JavaScript at the bottom of your source.</h4>
<pre>Deprecated since version 4.3! Use page.includeJSFooter instead.</pre>
<p>This might be more of a speed thing rather than SEO, but still&#8230; By default TYPO3 will put javascript includes in your header.</p>
<pre>-- SNIP: Deprecated snippet --</pre>
<p>TYPO3 also generates a default JavaScript which can be removed by putting this line in your template Setup section:</p>
<pre># Remove the default JS file in the header
config.removeDefaultJS = 1</pre>
<p>Make sure you copy the content of this file to your custom one before removing it.</p>
<h4>Tip: Extension <a title="Seo_Basics extension" href="http://typo3.org/extensions/repository/view/seo_basics/current/">seo_basics</a></h4>
<p style="text-align: left;">Benjamin Mack has developed an extension (<a title="Seo_Basics extension" href="http://typo3.org/extensions/repository/view/seo_basics/current/">seo_basics)</a> which is really useful. It not only generates the XML sitemap by default, but it also helps you to update the page descriptions and meta tags. Download and install the extension through the extension manager. Once installed, go to http://www.your-website.com/sitemap.xml, you&#8217;ll notice it works right out of the box. (If it doesn&#8217;t, please check you RealURL configuration). But this is just the beginning. Go to the &#8220;info&#8221; module and select your root website page. Now, in the drop-down box choose &#8220;SEO Management&#8221;.</p>
<p>(Update: 17-01-2010: Breaking change in extension update, include static template first!)</p>
<div id="attachment_569" class="wp-caption aligncenter" style="width: 600px"><a href="http://www.typo3-addict.com/wp-content/uploads/2009/10/seo_basics_11.png"><img class="size-full wp-image-569 " title="Seo Basics: Screen 1" src="http://www.typo3-addict.com/wp-content/uploads/2009/10/seo_basics_11.png" alt="Click to enlarge!" width="590" /></a><p class="wp-caption-text">Click to enlarge!</p></div>
<p style="text-align: left;">Here you&#8217;ll see all pages with there url-path, title, description and metatags. Click on the &#8220;Edit SEO fields&#8221;. Now you&#8217;ll notice you can edit all fields of all pages within one screen! Once you start filling in the details you&#8217;ll notice the color changes while typing:</p>
<p style="text-align: left;">Yellow: To little text<br />
Green: Just good!<br />
Red: To much text</p>
<p>If you would like to add META Abstract &amp; Author to seo_basics please look at this post of Michael Cannon: <a href="http://www.acqal.com/blog/a/article/add-meta-abstract-author-to-seo-basics/">http://www.acqal.com/blog/a/article/add-meta-abstract-author-to-seo-basics/</a></p>
<div id="attachment_570" class="wp-caption aligncenter" style="width: 600px"><a href="http://www.typo3-addict.com/wp-content/uploads/2009/10/seo_basics_2.png"><img class="size-full wp-image-570 " title="seo_basics_2" src="http://www.typo3-addict.com/wp-content/uploads/2009/10/seo_basics_2.png" alt="Click to enlarge!" width="590" /></a><p class="wp-caption-text">Click to enlarge!</p></div>
<h4>Hope you liked this post:)</h4>
<p>These basics are far from a complete reference but I hope they will be of use. If you&#8217;ve got suggestions, please don&#8217;t hesitate to comment&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2009/10/typo3-seo-the-basics/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>TYPO3 SEO: Combining graphical headers with text headers</title>
		<link>http://www.typo3-addict.com/2009/09/typo3-seo-combining-graphical-headers-with-text-headers/</link>
		<comments>http://www.typo3-addict.com/2009/09/typo3-seo-combining-graphical-headers-with-text-headers/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 08:00:50 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[GIFBUILDER]]></category>
		<category><![CDATA[Headers]]></category>
		<category><![CDATA[Typoscript]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=539</guid>
		<description><![CDATA[When you want to use an exotic font you&#8217;ll always end up with SEO problems. Ofcourse there is SIFR but this requires flash and there are still a lot of big companies who won&#8217;t allow flash on their computers. And even though you can set alt and titles attributes for graphical headers using TypoScript, a [...]]]></description>
			<content:encoded><![CDATA[<p>When you want to use an exotic font you&#8217;ll always end up with SEO problems. Ofcourse there is SIFR but this requires flash and there are still a lot of big companies who won&#8217;t allow flash on their computers. And even though you can set alt and titles attributes for graphical headers using TypoScript, a text header is always better for SEO.</p>
<p>Here&#8217;s a bit of TypoScript which produces both a graphical and a text header for the same single content element. You can display the graphical header and hide the text header using css (for example: indent: -9999). This way users will experience the nice graphical header while search engines will still be able to crawl the text header. We&#8217;ll give the text-header a H2 attribute so the importants is obvious to the search engine.</p>
<p><span id="more-539"></span></p>
<p>This snippets produces a H2 header with the same headertitle for both the graphical header as the text header:</p>
<pre>lib.stdheader.10.2 = COA
lib.stdheader.10.2 {
	10 = IMAGE
	10 {
   		wrap = &lt;span&gt;|&lt;/span&gt;
                file = GIFBUILDER
   		file {
   			XY = [10.w]+1,60
   			backColor = #ffffff
   			transparentBackground = 1
   			10 = TEXT
   			10 {
   				text.field = header
   				text.current = 1
   				fontSize = 52
   				offset = 0,50
   				fontFile =  path/to/your/font.ttf
   				fontColor = #000000
   				niceText = 1
    			}
   		}
   	}
	20 = TEXT
	20 {
		wrap = &lt;h2 class="headerDesc"&gt;|&lt;/h2&gt;
                field = header
	}
}</pre>
<p>Maybe you would like to have a different alt and title text with the graphical header instead of the actually image text and also want this different text to show in your text-header. Since TYPO3 has no extra BE-field for this issue, you should use &#8220;Text and Image&#8221; instead of &#8220;Text&#8221;. This way you&#8217;ll have more BE-fields you can use. In this example I&#8217;ll use the &#8220;Long URL Description&#8221; field to define our alt, title and text-header content.</p>
<pre>lib.stdheader.10.2 = COA
lib.stdheader.10.2 {
	10 = IMAGE
	10 {
   		alttext.field = longdescURL
   		titleText.field = longdescURL
   		wrap =  &lt;span&gt;| &lt;/span&gt;
   		file = GIFBUILDER
   		file {
   			XY = [10.w]+1,60
   			backColor = #ffffff
   			transparentBackground = 1
   			10 = TEXT
   			10 {
   				text.field = header
   				text.current = 1
   				fontSize = 52
   				offset = 0,50
   				fontFile =  path/to/your/font.ttf
   				fontColor = #000000
   				niceText = 1
    			}
   		}
   	}
	20 = TEXT
	20 {
		wrap =  &lt;h2 class="headerDesc"&gt;|&lt;/h2&gt;
  		field = longdescURL
	}
}</pre>
<p>I hope this will be useful. If you have any questions or comments please don&#8217;t hesitate&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2009/09/typo3-seo-combining-graphical-headers-with-text-headers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>TYPO3: Quick RSS feed of tt_news</title>
		<link>http://www.typo3-addict.com/2009/03/quick-rss-feed-of-tt_news/</link>
		<comments>http://www.typo3-addict.com/2009/03/quick-rss-feed-of-tt_news/#comments</comments>
		<pubDate>Sun, 15 Mar 2009 20:14:54 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Snippets]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[tt_news]]></category>
		<category><![CDATA[Typoscript]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=400</guid>
		<description><![CDATA[RSS-feeds of tt_news are really simple. To make it even more easy just copy-paste this to your TypoScript setup: plugin.tt_news { # SYS-Folder with newsitems pid_list = # Page with single view singlePid = displayXML { xmlTitle = Your RSS title xmlLink = Your website url xmlDesc = Your RSS description subheader_stdWrap.crop = 250 &#124; [...]]]></description>
			<content:encoded><![CDATA[<p>RSS-feeds of tt_news are really simple. To make it even more easy just copy-paste this to your TypoScript setup:</p>
<pre>plugin.tt_news {
# SYS-Folder with newsitems
pid_list =
# Page with single view
singlePid =
displayXML {
  xmlTitle = Your RSS title
  xmlLink = Your website url
  xmlDesc = Your RSS description
  subheader_stdWrap.crop = 250 | ... | 1
  }
}</pre>
<p>Now just go to your homepage and add &amp;type=100 to the url! You&#8217;re done</p>
<p>There are a few more options, but above are the most important. See the tt_news manual for a complete reference!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2009/03/quick-rss-feed-of-tt_news/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TYPO3: Clear all cache for non-admins</title>
		<link>http://www.typo3-addict.com/2009/03/clear-all-cache-for-non-admins/</link>
		<comments>http://www.typo3-addict.com/2009/03/clear-all-cache-for-non-admins/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 10:44:24 +0000</pubDate>
		<dc:creator>Maarten</dc:creator>
				<category><![CDATA[Snippets]]></category>
		<category><![CDATA[TSConfig]]></category>
		<category><![CDATA[Typoscript]]></category>

		<guid isPermaLink="false">http://www.typo3-addict.com/?p=394</guid>
		<description><![CDATA[With this line of User TSConfig you can enable non-be-admin&#8217;s to clear all cache the way an admin would. options.clearCache.all = 1]]></description>
			<content:encoded><![CDATA[<p>With this line of User TSConfig you can enable non-be-admin&#8217;s to clear all cache the way an admin would.</p>
<pre>options.clearCache.all = 1</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.typo3-addict.com/2009/03/clear-all-cache-for-non-admins/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
