<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Multiple Views with CodeIgniter 1.6</title>
	<atom:link href="http://null-logic.net/blog/2008/02/07/multiple-views-with-codeigniter-16/feed/" rel="self" type="application/rss+xml" />
	<link>http://null-logic.net/blog/2008/02/07/multiple-views-with-codeigniter-16/</link>
	<description></description>
	<lastBuildDate>Tue, 08 Jun 2010 19:48:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Naushad</title>
		<link>http://null-logic.net/blog/2008/02/07/multiple-views-with-codeigniter-16/comment-page-1/#comment-12128</link>
		<dc:creator>Naushad</dc:creator>
		<pubDate>Mon, 09 Mar 2009 19:13:16 +0000</pubDate>
		<guid isPermaLink="false">http://null-logic.net/blog/2008/02/07/multiple-views-with-codeigniter-16/#comment-12128</guid>
		<description>how can i use database values in html tables ?</description>
		<content:encoded><![CDATA[<p>how can i use database values in html tables ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kuve</title>
		<link>http://null-logic.net/blog/2008/02/07/multiple-views-with-codeigniter-16/comment-page-1/#comment-1522</link>
		<dc:creator>kuve</dc:creator>
		<pubDate>Thu, 07 Aug 2008 16:12:40 +0000</pubDate>
		<guid isPermaLink="false">http://null-logic.net/blog/2008/02/07/multiple-views-with-codeigniter-16/#comment-1522</guid>
		<description>I&#039;ve tried it and it works, now I can use blocks in my websites.

Thanks!</description>
		<content:encoded><![CDATA[<p>I&#8217;ve tried it and it works, now I can use blocks in my websites.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Natebot</title>
		<link>http://null-logic.net/blog/2008/02/07/multiple-views-with-codeigniter-16/comment-page-1/#comment-315</link>
		<dc:creator>Natebot</dc:creator>
		<pubDate>Wed, 09 Apr 2008 23:04:12 +0000</pubDate>
		<guid isPermaLink="false">http://null-logic.net/blog/2008/02/07/multiple-views-with-codeigniter-16/#comment-315</guid>
		<description>whoop!  Ok here is the whole thing correctly formatted!

Content view (/content/mycontent.php):

&lt;code&gt;
 &lt;p&gt;this is the content section of the page where we display the controller&#039;s output: &lt;?=$content?&gt; 
&lt;/p&gt;
&lt;/code&gt;

It might be a bit to complex for simple apps but it helps if you want to add/remove a view, like a sidebar for your entire site</description>
		<content:encoded><![CDATA[<p>whoop!  Ok here is the whole thing correctly formatted!</p>
<p>Content view (/content/mycontent.php):</p>
<p><code><br />
 &lt;p&gt;this is the content section of the page where we display the controller's output: &lt;?=$content?&gt;<br />
&lt;/p&gt;<br />
</code></p>
<p>It might be a bit to complex for simple apps but it helps if you want to add/remove a view, like a sidebar for your entire site</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Natebot</title>
		<link>http://null-logic.net/blog/2008/02/07/multiple-views-with-codeigniter-16/comment-page-1/#comment-314</link>
		<dc:creator>Natebot</dc:creator>
		<pubDate>Wed, 09 Apr 2008 23:02:26 +0000</pubDate>
		<guid isPermaLink="false">http://null-logic.net/blog/2008/02/07/multiple-views-with-codeigniter-16/#comment-314</guid>
		<description>hmmm, looks like final section got stripped of my php tag.  I&#039;ll try html characters to display it:

Content view (/content/mycontent.php):

&lt;code&gt;
 this is the content section of the page where we display the controller&#039;s output: &gt;?=$content?&lt; 

&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>hmmm, looks like final section got stripped of my php tag.  I&#8217;ll try html characters to display it:</p>
<p>Content view (/content/mycontent.php):</p>
<p><code><br />
 this is the content section of the page where we display the controller's output: &gt;?=$content?&lt; </p>
<p></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Natebot</title>
		<link>http://null-logic.net/blog/2008/02/07/multiple-views-with-codeigniter-16/comment-page-1/#comment-313</link>
		<dc:creator>Natebot</dc:creator>
		<pubDate>Wed, 09 Apr 2008 22:59:36 +0000</pubDate>
		<guid isPermaLink="false">http://null-logic.net/blog/2008/02/07/multiple-views-with-codeigniter-16/#comment-313</guid>
		<description>I have discovered that you can have a view call other views, so my controllers only call one view which in turn calls the header, footer, and content.

I have the controller pass path of the particular content view it needs.

Based on your example, the controller:
&lt;code&gt;
$data[&#039;links&#039;] = $this-&gt;_load_links();
$data[&#039;content&#039;] = $this-&gt;_load_content();
$data[&#039;content_view&#039;] = &#039;content/mycontent&#039;;
$this-&gt;load-&gt;vars($data);
$this-&gt;load-&gt;view(&#039;container&#039;);
&lt;/code&gt; 

Container view (container.php) loads header, footer, and content page:
&lt;code&gt;
$this-&gt;load-&gt;view(&#039;header&#039;);
$this-&gt;load-&gt;view($content_view);// loads the file at &#039;views/content/mycontent.php&#039;
$this-&gt;load-&gt;view(&#039;footer&#039;);
&lt;/code&gt;

Content view (/content/mycontent.php):

&lt;code&gt;
 this is the content section of the page where we display the controller&#039;s output:  

&lt;/code&gt;

It might be a bit to complex for simple apps but it helps if you want to add/remove a view, like a sidebar for your entire site.</description>
		<content:encoded><![CDATA[<p>I have discovered that you can have a view call other views, so my controllers only call one view which in turn calls the header, footer, and content.</p>
<p>I have the controller pass path of the particular content view it needs.</p>
<p>Based on your example, the controller:<br />
<code><br />
$data['links'] = $this-&gt;_load_links();<br />
$data['content'] = $this-&gt;_load_content();<br />
$data['content_view'] = 'content/mycontent';<br />
$this-&gt;load-&gt;vars($data);<br />
$this-&gt;load-&gt;view('container');<br />
</code> </p>
<p>Container view (container.php) loads header, footer, and content page:<br />
<code><br />
$this-&gt;load-&gt;view('header');<br />
$this-&gt;load-&gt;view($content_view);// loads the file at 'views/content/mycontent.php'<br />
$this-&gt;load-&gt;view('footer');<br />
</code></p>
<p>Content view (/content/mycontent.php):</p>
<p><code><br />
 this is the content section of the page where we display the controller's output:  </p>
<p></code></p>
<p>It might be a bit to complex for simple apps but it helps if you want to add/remove a view, like a sidebar for your entire site.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: dprevite</title>
		<link>http://null-logic.net/blog/2008/02/07/multiple-views-with-codeigniter-16/comment-page-1/#comment-37</link>
		<dc:creator>dprevite</dc:creator>
		<pubDate>Thu, 14 Feb 2008 05:13:29 +0000</pubDate>
		<guid isPermaLink="false">http://null-logic.net/blog/2008/02/07/multiple-views-with-codeigniter-16/#comment-37</guid>
		<description>No problem, &lt;a href=&quot;http://null-logic.net/blog/2008/02/13/blog-controller/&quot; rel=&quot;nofollow&quot;&gt;here&#039;s an example controller class for a blog&lt;/a&gt;. You can comment on that post if you have other questions. You should also check out &lt;a href=&quot;http://codeigniter.com/user_guide/general/controllers.html&quot; rel=&quot;nofollow&quot;&gt;the CodeIgniter documentation&lt;/a&gt; if you haven&#039;t. </description>
		<content:encoded><![CDATA[<p>No problem, <a href="http://null-logic.net/blog/2008/02/13/blog-controller/" rel="nofollow">here&#8217;s an example controller class for a blog</a>. You can comment on that post if you have other questions. You should also check out <a href="http://codeigniter.com/user_guide/general/controllers.html" rel="nofollow">the CodeIgniter documentation</a> if you haven&#8217;t.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://null-logic.net/blog/2008/02/07/multiple-views-with-codeigniter-16/comment-page-1/#comment-18</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Sat, 09 Feb 2008 12:39:57 +0000</pubDate>
		<guid isPermaLink="false">http://null-logic.net/blog/2008/02/07/multiple-views-with-codeigniter-16/#comment-18</guid>
		<description>Hey man, great article, i may ask u something, iam really new in ci, iam wonderin if u can show, that entire controller file. iam come to use template for posicion .. here i dont understand how positionar, the views in the page.
txs for advance, good work!

--
sry about my english :(</description>
		<content:encoded><![CDATA[<p>Hey man, great article, i may ask u something, iam really new in ci, iam wonderin if u can show, that entire controller file. iam come to use template for posicion .. here i dont understand how positionar, the views in the page.<br />
txs for advance, good work!</p>
<p>&#8211;<br />
sry about my english <img src='http://null-logic.net/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
