<?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>72dpi.net.au &#187; Joomla</title>
	<atom:link href="http://www.72dpi.net.au/tag/joomla/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.72dpi.net.au</link>
	<description>Web Development and Design</description>
	<lastBuildDate>Fri, 19 Mar 2010 02:06:46 +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>Content or Images for Certain Pages</title>
		<link>http://www.72dpi.net.au/2007/07/content-or-images-for-certain-pages/</link>
		<comments>http://www.72dpi.net.au/2007/07/content-or-images-for-certain-pages/#comments</comments>
		<pubDate>Thu, 19 Jul 2007 12:18:51 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Joomla]]></category>

		<guid isPermaLink="false">http://test.72dpi.net.au/?p=18</guid>
		<description><![CDATA[This neat little code snippet will allow you to target a particular article, and show content specific to that only.

One of the main problems Joomla! faces, is the fact that the $id variable, can be shared across a section, category or article. If you want the ability to change the image in the header of [...]]]></description>
			<content:encoded><![CDATA[<p>This neat little code snippet will allow you to target a particular article, and show content specific to that only.</p>
<p><span id="more-18"></span></p>
<p>One of the main problems Joomla! faces, is the fact that the $id variable, can be shared across a section, category or article. If you want the ability to change the image in the header of your template to suit a particluar article, this neat little code snippet will allow you to do just that.</p>
</p>
<p>In your index.php template, use the following code wherever you want the dynamic content to be:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$task</span> <span style="color: #339933;">=</span> mosGetParam<span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'task'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$id</span> <span style="color: #339933;">=</span> mosGetParam<span style="color: #009900;">&#40;</span><span style="color: #000088;">$_REQUEST</span><span style="color: #339933;">,</span><span style="color: #0000ff;">'id'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$task</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;section&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$task</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;category&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">switch</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$id</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">2</span><span style="color: #339933;">;</span> <span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'This is content for my articles 1, 2 &amp; 3'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">4</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'This is content for my article 4'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">case</span> <span style="color: #cc66cc;">5</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'This is content for my article 5'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">default</span><span style="color: #339933;">:</span>
<span style="color: #b1b100;">echo</span><span style="color: #0000ff;">'This is default content for any other articles'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #009900;">&#123;</span>
<span style="color: #b1b100;">echo</span><span style="color: #0000ff;">'This is default content for any other articles, or Sections &amp; categories'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

</p>
<p>My case statements, ie: 1, 2 3 etc, are the &quot;id&#8217;s of my news articles.</p>
<p>Enjoy! </p>
]]></content:encoded>
			<wfw:commentRss>http://www.72dpi.net.au/2007/07/content-or-images-for-certain-pages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
