<?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>Webdevelopment at huuah.com &#187; TemplaVoila</title>
	<atom:link href="http://huuah.com/tag/templavoila/feed/" rel="self" type="application/rss+xml" />
	<link>http://huuah.com</link>
	<description>webdevelopment, cms, php, javascript etc</description>
	<lastBuildDate>Sat, 04 Sep 2010 22:55:27 +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>TemplaVoila with default elements</title>
		<link>http://huuah.com/templavoila-with-default-elements/</link>
		<comments>http://huuah.com/templavoila-with-default-elements/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 20:19:43 +0000</pubDate>
		<dc:creator>js - huuah</dc:creator>
				<category><![CDATA[TYPO3]]></category>
		<category><![CDATA[TemplaVoila]]></category>

		<guid isPermaLink="false">http://huuah.com/?p=105</guid>
		<description><![CDATA[<p>There it was. A very basic TemplaVoila setup with two content elements. A <em>content</em> and a <em>rightbar</em>. The <em>content</em> is of course for all the regular stuff on the page, and the <em>right bar</em> has some standard highlights.</p>
<p>When both the <em>content</em> and the <em>rightbar</em> is of the type <em>Content</em>&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>There it was. A very basic TemplaVoila setup with two content elements. A <em>content</em> and a <em>rightbar</em>. The <em>content</em> is of course for all the regular stuff on the page, and the <em>right bar</em> has some standard highlights.</p>
<p>When both the <em>content</em> and the <em>rightbar</em> is of the type <em>Content Elements</em>, you have to manually insert elements on every single page, that should have output. </p>
<p>Wouldn&#8217;t it be nice, if the <em>rightbar</em> could have some default Content Elements outputted automatically, if you haven&#8217;t inserted any elements? Yes, it would!</p>
<p>So. To the fun part. Open your TemplaVoila section in the TYPO3 backend and edit the Data Structure (DS) for the template. The textfield <strong>Data Structure XML</strong> has a lot of XML-data and you should scroll down until you find the section of your element. In my case the element is named field_right and I should then find something like this:</p>
<pre class="brush: plain;">
...
        &lt;field_right type=&quot;array&quot;&gt;
				&lt;tx_templavoila type=&quot;array&quot;&gt;
					&lt;title&gt;&lt;/title&gt;
					&lt;sample_data type=&quot;array&quot;&gt;
						&lt;numIndex index=&quot;0&quot;&gt;&lt;/numIndex&gt;
					&lt;/sample_data&gt;
					&lt;eType&gt;ce&lt;/eType&gt;
					&lt;TypoScript&gt;&lt;![CDATA[
	10= RECORDS
	10.source.current=1
	10.tables = tt_content
	10.wrap = &lt;!--TYPO3SEARCH_begin--&gt; | &lt;!--TYPO3SEARCH_end--&gt;
                    ]]&gt;&lt;/TypoScript&gt;
...
</pre>
<p>We are then going to edit the &lt;TypoScript&gt;-section, so it should look like this:</p>
<pre class="brush: plain; highlight: [14,15,16,17,18,19,20,21,22,23];">
...
        &lt;field_right type=&quot;array&quot;&gt;
				&lt;tx_templavoila type=&quot;array&quot;&gt;
					&lt;title&gt;&lt;/title&gt;
					&lt;sample_data type=&quot;array&quot;&gt;
						&lt;numIndex index=&quot;0&quot;&gt;&lt;/numIndex&gt;
					&lt;/sample_data&gt;
					&lt;eType&gt;ce&lt;/eType&gt;
					&lt;TypoScript&gt;&lt;![CDATA[
	10= RECORDS
	10.source.current=1
	10.tables = tt_content
	10.wrap = &lt;!--TYPO3SEARCH_begin--&gt; | &lt;!--TYPO3SEARCH_end--&gt;
	20 = COA
	20 {
		10 = RECORDS
		10.tables = tt_content
		10.source = 57
		if {
			value.current = 1
			equals =
		}
	}
                    ]]&gt;&lt;/TypoScript&gt;
...
</pre>
<p>This will insert an extra set of data. The COA-element is a container used only for checking if there is any content. Inside the <strong>20</strong> we will insert the content of the <strong>tt_content-element</strong> with the <strong>uid 57</strong>, if the <strong>current value</strong> is nonexisting.</p>
<p>The uid should be changed to the uid of your choice and it is even possible to insert a comma separated list of multiple uids.</p>
<p>The result should now be, that the content of uid 57 will be shown on every page, if the page does not have any elements add to the field_right section in TemplaVoila.</p>
<p>There you go. A TemplaVoila setup with some default output.</p>
<p><span class="warning">*IMPORTANT* when making updates to the TemplaVoila configuration (mappings etc.) the above changes WILL BE overwriting.</span></p>
]]></content:encoded>
			<wfw:commentRss>http://huuah.com/templavoila-with-default-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to setup up different top images in TYPO3</title>
		<link>http://huuah.com/how-to-setup-up-different-top-images-in-typo3/</link>
		<comments>http://huuah.com/how-to-setup-up-different-top-images-in-typo3/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 20:05:00 +0000</pubDate>
		<dc:creator>js - huuah</dc:creator>
				<category><![CDATA[TYPO3]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[TemplaVoila]]></category>
		<category><![CDATA[typoscript]]></category>

		<guid isPermaLink="false">http://huuah.com/?p=90</guid>
		<description><![CDATA[<p>This post will be about how to setup a TYPO3 template, with the option to have a different image on top of each page.</p>
<p>I&#8217;m using TemplaVoila with a very simple setup. 3 fields &#8211; header image, menu and a content-element. The focus will be on the header image element,&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p>This post will be about how to setup a TYPO3 template, with the option to have a different image on top of each page.</p>
<p>I&#8217;m using TemplaVoila with a very simple setup. 3 fields &#8211; header image, menu and a content-element. The focus will be on the header image element, which in my case is mapped to a &lt;div&nbsp;&gt; and saved as the type &#8220;<strong>TypoScript Object Path</strong>&#8221; with an &#8220;<strong>Object Path</strong>&#8221; named &#8220;<em>lib.headerimg</em>&#8220;.</p>
<p>The next step is to setup the template to insert an image in the <em>lib.headerimg</em>. This is done by inserting to following into the <strong>Template Setup</strong> field:</p>
<pre class="brush: plain;">
lib.headerimg = IMAGE
lib.headerimg {
  #this is the default image, for pages with no specific image add
  file = fileadmin/default.gif

  #if the selected page has an added image, the set this instead of the default above
  file.import.override.field = media

  #fetch image from the upload/media/ folder
  file.import.data = levelmedia: -1, &quot;slide&quot;
  file.import = uploads/media/

  #lock the configuration to use only the first added image
  file.import.listNum = 0
}</pre>
<p>That&#8217;s it! Save, clear cache and view your site. Every page should now be showing the default.gif image as entered in the template configuration.</p>
<p>To make the image change for a single page, your should go the page property for the page, select the &#8220;<strong>Resources</strong>&#8221; tab and upload an image in the &#8220;<strong>Files</strong>&#8221; section. When the image is uploaded, this page should now be showing the newly added image.</p>
]]></content:encoded>
			<wfw:commentRss>http://huuah.com/how-to-setup-up-different-top-images-in-typo3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
