<?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>Abraxas &#187; templavoila</title>
	<atom:link href="http://www.effinger.org/blog/tag/templavoila/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.effinger.org/blog</link>
	<description>a personal knowledge base</description>
	<lastBuildDate>Sun, 06 Jun 2010 17:41:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Templavoila: Sidebar statt leerem Inhalt anzeigen</title>
		<link>http://www.effinger.org/blog/2008/10/19/templavoila-sidebar-statt-leerem-inhalt-anzeigen/</link>
		<comments>http://www.effinger.org/blog/2008/10/19/templavoila-sidebar-statt-leerem-inhalt-anzeigen/#comments</comments>
		<pubDate>Sun, 19 Oct 2008 16:42:52 +0000</pubDate>
		<dc:creator>Markus Effinger</dc:creator>
				<category><![CDATA[typo3]]></category>
		<category><![CDATA[templavoila]]></category>

		<guid isPermaLink="false">http://www.effinger.org/blog/?p=51</guid>
		<description><![CDATA[<p>Auf einer Webseite wollte ich für den Fall, dass der Redakteur bei einer Spalte oder einem Content-Element keinen Inhalt hinterlegt hat automatisch den Inhalt einer bestimmten Seite anzeigen. Nach langem Suchen habe ich es schließlich geschafft, in dem ich die Extension flexform_getfield verwendet habe. Weitergeholfen hat mir dabei auch ein Forumsbeitrag auf typo3.net.</p>
<p>In der DS-XML-Datei [...]]]></description>
			<content:encoded><![CDATA[<p>Auf einer Webseite wollte ich für den Fall, dass der Redakteur bei einer Spalte oder einem Content-Element keinen Inhalt hinterlegt hat automatisch den Inhalt einer bestimmten Seite anzeigen. Nach langem Suchen habe ich es schließlich geschafft, in dem ich die Extension <a href="http://typo3.org/extensions/repository/view/flexform_getfield/current/">flexform_getfield</a> verwendet habe. Weitergeholfen hat mir dabei auch ein <a href="http://www.typo3.net/index.php?id=13&#038;action=list_post&#038;code_numbering=0&#038;tid=67208&#038;page=1">Forumsbeitrag auf typo3.net</a>.</p>
<p>In der DS-XML-Datei habe ich folgende Zeilen</p>

<div class="wp_syntax"><div class="code"><pre class="typoscript" style="font-family:monospace;"><span style="color: #cc0000;">10</span> <span style="color: #009900;">&#123;</span>
	source<span style="color: #339933; font-weight: bold;">.</span>current<span style="color: #339933; font-weight: bold;">=</span><span style="color: #cc0000;">1</span>
	tables <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #000066; font-weight: bold;">tt_content</span>
	wrap <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #3366CC;">&lt;!--TYPO3SEARCH_begin--&gt;</span> <span style="color: #339933; font-weight: bold;">|</span> <span style="color: #3366CC;">&lt;!--TYPO3SEARCH_end--&gt;</span> 
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>in</p>

<div class="wp_syntax"><div class="code"><pre class="typoscript" style="font-family:monospace;">	<span style="color: #cc0000;">10</span> <span style="color: #009900;">&#123;</span>
		source<span style="color: #339933; font-weight: bold;">.</span>current<span style="color: #339933; font-weight: bold;">=</span><span style="color: #cc0000;">1</span>
		tables <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #000066; font-weight: bold;">tt_content</span>
		<span style="color: #aaa; font-style: italic;">#Typo3-Search nur ausgeben, wenn Inhalt vorhanden ist - siehe http://www.typo3-jack.net/typo3-dev-lists-netfielders-de/2404-typo3-dev-typoscript-stdwrap-ifempty-but-no-stdwrap-ifisset.html</span>
		<span style="font-weight: bold;">stdWrap</span> <span style="color: #009900;">&#123;</span>
			required <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #cc0000;">1</span>
			wrap <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #3366CC;">&lt;!--TYPO3SEARCH_begin--&gt;</span><span style="color: #339933; font-weight: bold;">|</span><span style="color: #3366CC;">&lt;!--TYPO3SEARCH_end--&gt;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="font-weight: bold;">stdWrap</span><span style="color: #339933; font-weight: bold;">.</span>ifEmpty<span style="color: #339933; font-weight: bold;">.</span>cObject <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #990000; font-weight: bold;">COA</span>
		<span style="font-weight: bold;">stdWrap</span><span style="color: #339933; font-weight: bold;">.</span>ifEmpty<span style="color: #339933; font-weight: bold;">.</span>cObject <span style="color: #339933; font-weight: bold;">=&lt;</span> <span style="color: #000066; font-weight: bold;">temp</span><span style="color: #339933; font-weight: bold;">.</span>getNews
	<span style="color: #009900;">&#125;</span> </pre></div></div>

<p>abgeändert. Das obige Konstrukt temp.getNews sollte dabei auf den Inhalt einer ebenfalls vom Redakteur bearbeitbaren Seite verweisen. Das habe ich folgendermaßen bewerkstelligt:</p>

<div class="wp_syntax"><div class="code"><pre class="typoscript" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">temp</span><span style="color: #339933; font-weight: bold;">.</span>getNewsID <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #990000; font-weight: bold;">USER</span>
<span style="color: #000066; font-weight: bold;">temp</span><span style="color: #339933; font-weight: bold;">.</span>getNewsID <span style="color: #009900;">&#123;</span>
	<span style="color: #ed7d14;">userFunc</span> <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #000066; font-weight: bold;">tx_flexformgetfield_pi1</span>-<span style="color: #339933; font-weight: bold;">&gt;</span>main
	<span style="color: #000066; font-weight: bold;">field</span> <span style="color: #339933; font-weight: bold;">=</span> field_centercontent
	recLevel<span style="color: #339933; font-weight: bold;">=</span><span style="color: #cc0000;">4</span>
	<span style="color: #aaa; font-style: italic;">#UID der Seite mit den News</span>
	uid<span style="color: #339933; font-weight: bold;">=</span><span style="color: #cc0000;">149</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000066; font-weight: bold;">temp</span><span style="color: #339933; font-weight: bold;">.</span>getNews <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #990000; font-weight: bold;">RECORDS</span>
<span style="color: #000066; font-weight: bold;">temp</span><span style="color: #339933; font-weight: bold;">.</span>getNews<span style="color: #339933; font-weight: bold;">.</span>source<span style="color: #339933; font-weight: bold;">.</span>cObject <span style="color: #339933; font-weight: bold;">&lt;</span> <span style="color: #000066; font-weight: bold;">temp</span><span style="color: #339933; font-weight: bold;">.</span>getNewsID
<span style="color: #000066; font-weight: bold;">temp</span><span style="color: #339933; font-weight: bold;">.</span>getNews<span style="color: #339933; font-weight: bold;">.</span>tables <span style="color: #339933; font-weight: bold;">=</span> <span style="color: #000066; font-weight: bold;">tt_content</span></pre></div></div>

<p>Es hat ewig gedauert, bis ich herausgefunden hatte, dass man nur durch die Änderung von source.cObject die NewsID übergeben kann und nicht etwa durch temp.getNews.source < temp.getNewsID.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.effinger.org/blog/2008/10/19/templavoila-sidebar-statt-leerem-inhalt-anzeigen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
