<?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/category/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>Disable Mootools Javascript from Joomla 1.5 frontend</title>
		<link>http://www.72dpi.net.au/2009/06/disable-mootools-javascript-from-joomla-frontend/</link>
		<comments>http://www.72dpi.net.au/2009/06/disable-mootools-javascript-from-joomla-frontend/#comments</comments>
		<pubDate>Thu, 25 Jun 2009 04:37:33 +0000</pubDate>
		<dc:creator>Ryan</dc:creator>
				<category><![CDATA[Joomla]]></category>

		<guid isPermaLink="false">http://www.72dpi.net.au/?p=125</guid>
		<description><![CDATA[Whilst I have nothing against the MooTools javascript library for websites (it&#8217;s an awesome resource), I have built a lot of Joomla 1.0.x sites using the Jquery Javascript library. Now, this can cause a few conflicts, and it seems that with the introduction of Joomla 1.5.x, you&#8217;re pretty much forced into using it. or so [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-126" title="joomla-no-mootools" src="http://www.72dpi.net.au/wp-content/uploads/2009/06/joomla-no-mootools.jpg" alt="joomla-no-mootools" width="200" height="133" />Whilst I have nothing against the MooTools javascript library for websites (it&#8217;s an awesome resource), I have built a lot of Joomla 1.0.x sites using the Jquery Javascript library. Now, this can cause a few conflicts, and it seems that with the introduction of Joomla 1.5.x, you&#8217;re pretty much forced into using it. or so I thought&#8230;.</p>
<p><span id="more-125"></span>A quick <a href="http://www.google.com.au/search?q=joomla+1.5+disable+mootools+caption+javascripts+&amp;ie=utf-8&amp;oe=utf-8&amp;aq=t&amp;rls=org.mozilla:en-US:official&amp;client=firefox-a">google search</a> on the subject revealed some nice ways to disable it from the frontend of your website (not appropriate for the backend, as it uses the MT library extensively.</p>
<p>I am by far no Javascript or php guru, but can get done what I need. Anyhow, the nicest bit of code i found to do the job was:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #000088;">$user</span> <span style="color: #339933;">=&amp;</span>amp<span style="color: #339933;">;</span> JFactory<span style="color: #339933;">::</span><span style="color: #004000;">getUser</span><span style="color: #009900;">&#40;</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: #000088;">$user</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>get<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'guest'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>get<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'usertype'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'Registered'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$headerstuff</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>getHeadData<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$headerstuff</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'scripts'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>setHeadData<span style="color: #009900;">&#40;</span><span style="color: #000088;">$headerstuff</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Perfect, just add it to your template >  index.php file, right above:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">  &lt;jdoc:include type=&quot;head&quot; /&gt;</pre></td></tr></table></div>

<p>I wanted to take it a step further (since I am building a few templates), and make it easy for anyone to change. Since Joomla 1.5 has a parameters file (which stores settings selected from templateDetails.xml), I simply added my on/off select button to the .xml file, defined the parameters in my template index file, and it works.</p>
<p>This is the code, and steps to make this happen.</p>
<p>In your Joomla 1.5 template folder:<br />
templates > your_template_folder</p>
<p>open up: templateDetails.xml and add the following:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;@spacer&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;spacer&quot;</span> <span style="color: #000066;">default</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">label</span>=<span style="color: #ff0000;">&quot;&quot;</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #000000; font-weight: bold;">/&gt;</span></span>	
&nbsp;
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;param</span> <span style="color: #000066;">name</span>=<span style="color: #ff0000;">&quot;Use_Mootools&quot;</span> <span style="color: #000066;">type</span>=<span style="color: #ff0000;">&quot;radio&quot;</span> <span style="color: #000066;">default</span>=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #000066;">label</span>=<span style="color: #ff0000;">&quot;Disable Mootools Javascript library frontend?&quot;</span> <span style="color: #000066;">description</span>=<span style="color: #ff0000;">&quot;Do you want to Disable the MooTools javscript library frontend?&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>			
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;option</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;0&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>No<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>			
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;option</span> <span style="color: #000066;">value</span>=<span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #000000; font-weight: bold;">&gt;</span></span>Yes<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/option<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>		
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/param<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>The Parameters are usually at the end of the .xml file. You can declare many tyopes of parameters this way (as long as you also declare them in the index.php heade). If your .xml file doesn&#8217;t have any parameters yet, simply add the code between:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="xml" style="font-family:monospace;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;params<span style="color: #000000; font-weight: bold;">&gt;</span></span></span>
add it here
<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/params<span style="color: #000000; font-weight: bold;">&gt;</span></span></span></pre></td></tr></table></div>

<p>Now open up your templates index.php file. in between the < head > &#8230; < /head > area, AFTER:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #990000;">defined</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'_JEXEC'</span> <span style="color: #009900;">&#41;</span> or <span style="color: #990000;">die</span><span style="color: #009900;">&#40;</span> <span style="color: #0000ff;">'Restricted access'</span> <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>we need to declare our new parameter, so add the following:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">/* Definition whether to enable or disable Mootools and captions.js files
This parameter should be turned off if you don't use any modules or Core Joomla compoinents that require it */</span>
<span style="color: #000088;">$Use_Mootools</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">params</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Use_Mootools&quot;</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span>?<span style="color: #0000ff;">&quot;yes&quot;</span><span style="color: #339933;">:</span><span style="color: #0000ff;">&quot;no&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// yes | no</span></pre></td></tr></table></div>

<p>Now that we have declared our variable, we need to envoke the code (or not).<br />
So, add the following code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$Use_Mootools</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;yes&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  	<span style="color: #000088;">$user</span> <span style="color: #339933;">=&amp;</span> JFactory<span style="color: #339933;">::</span><span style="color: #004000;">getUser</span><span style="color: #009900;">&#40;</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: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'guest'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'usertype'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'Registered'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$headerstuff</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getHeadData</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$headerstuff</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'scripts'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setHeadData</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$headerstuff</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
 	<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>right before:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>jdoc<span style="color: #339933;">:</span><span style="color: #b1b100;">include</span> type<span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;head&quot;</span> <span style="color: #339933;">/&gt;</span></pre></td></tr></table></div>

<p>Now, Open up your admin, edit the template, on the right you&#8217;ve got the parameters, select no/yes, and test. hopefully it all went smoothly!</p>
<h2>Edit:</h2>
<p>There is plugin available, that will do just this for you, in case you don&#8217;t want to edit your templates. :<br />
<a href="http://extensions.joomla.org/extensions/core-enhancements/scripts/8403/details">http://extensions.joomla.org/extensions/core-enhancements/scripts/8403/details</a> , my code gives template developers the opportunity to turn it off&#8230;</p>
<p>As pointed out by 2estrellas, this code may strip all code. I stumbled across a great blog over at<br />
<a href="http://www.blog.highub.com/cms/joomla-cms/remove-mootools-from-joomla-header/">highub</a>, so def check it out, but try changing:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$Use_Mootools</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;yes&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  	<span style="color: #000088;">$user</span> <span style="color: #339933;">=&amp;</span> JFactory<span style="color: #339933;">::</span><span style="color: #004000;">getUser</span><span style="color: #009900;">&#40;</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: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'guest'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #cc66cc;">1</span> <span style="color: #339933;">||</span> <span style="color: #000088;">$user</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'usertype'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">'Registered'</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$headerstuff</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getHeadData</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$headerstuff</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'scripts'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setHeadData</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$headerstuff</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
 	<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>to</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">  <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$Use_Mootools</span> <span style="color: #339933;">==</span> <span style="color: #0000ff;">&quot;yes&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
<span style="color: #000088;">$headerstuff</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getHeadData</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">reset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$headerstuff</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'scripts'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$moo</span> <span style="color: #339933;">=</span> <span style="color: #990000;">key</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$headerstuff</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'scripts'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$headerstuff</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'scripts'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$moo</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setHeadData</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$headerstuff</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
 	<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.72dpi.net.au/2009/06/disable-mootools-javascript-from-joomla-frontend/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<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>
