<?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: Criki &#8211; the creation of a wiki with CakePHP, Part 2</title>
	<atom:link href="http://cakebaker.42dh.com/2007/03/07/criki-the-creation-of-a-wiki-with-cakephp-part-2/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.42dh.com/2007/03/07/criki-the-creation-of-a-wiki-with-cakephp-part-2/</link>
	<description>baking cakes with CakePHP</description>
	<lastBuildDate>Thu, 11 Mar 2010 15:41:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Muhammad Hassan</title>
		<link>http://cakebaker.42dh.com/2007/03/07/criki-the-creation-of-a-wiki-with-cakephp-part-2/comment-page-1/#comment-6177</link>
		<dc:creator>Muhammad Hassan</dc:creator>
		<pubDate>Thu, 05 Apr 2007 19:05:57 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/03/07/criki-the-creation-of-a-wiki-with-cakephp-part-2/#comment-6177</guid>
		<description>Thank you for this tutorial.
Muhammad Hassan
www.BadrIT.com</description>
		<content:encoded><![CDATA[<p>Thank you for this tutorial.<br />
Muhammad Hassan<br />
<a href="http://www.BadrIT.com" rel="nofollow">http://www.BadrIT.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seth</title>
		<link>http://cakebaker.42dh.com/2007/03/07/criki-the-creation-of-a-wiki-with-cakephp-part-2/comment-page-1/#comment-5646</link>
		<dc:creator>Seth</dc:creator>
		<pubDate>Fri, 16 Mar 2007 18:18:58 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/03/07/criki-the-creation-of-a-wiki-with-cakephp-part-2/#comment-5646</guid>
		<description>@cakebaker: Thanks for taking the time to explain that. I feel Cake&#039;s docs are a bit lacking and sometimes inconsistent (in addition to 99% of the tutorials using mixtures of current and deprecated code) so it&#039;s been difficult for me to pick up on things.

Love the site!</description>
		<content:encoded><![CDATA[<p>@cakebaker: Thanks for taking the time to explain that. I feel Cake&#8217;s docs are a bit lacking and sometimes inconsistent (in addition to 99% of the tutorials using mixtures of current and deprecated code) so it&#8217;s been difficult for me to pick up on things.</p>
<p>Love the site!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2007/03/07/criki-the-creation-of-a-wiki-with-cakephp-part-2/comment-page-1/#comment-5412</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Sat, 10 Mar 2007 08:30:17 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/03/07/criki-the-creation-of-a-wiki-with-cakephp-part-2/#comment-5412</guid>
		<description>@duane: That&#039;s good to hear, I am looking forward for the next installments of this series.</description>
		<content:encoded><![CDATA[<p>@duane: That&#8217;s good to hear, I am looking forward for the next installments of this series.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: duane</title>
		<link>http://cakebaker.42dh.com/2007/03/07/criki-the-creation-of-a-wiki-with-cakephp-part-2/comment-page-1/#comment-5400</link>
		<dc:creator>duane</dc:creator>
		<pubDate>Fri, 09 Mar 2007 18:48:06 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/03/07/criki-the-creation-of-a-wiki-with-cakephp-part-2/#comment-5400</guid>
		<description>At the beginning of Part 5 (completed last week, but I don&#039;t have a timetable for when they will publish it), the Wiki markup is moved off to a helper.  I didn&#039;t have wordcount to cover helpers available in Part 2, though I should have covered it in Part 3.

Ultimately, that&#039;s the direction it goes though.</description>
		<content:encoded><![CDATA[<p>At the beginning of Part 5 (completed last week, but I don&#8217;t have a timetable for when they will publish it), the Wiki markup is moved off to a helper.  I didn&#8217;t have wordcount to cover helpers available in Part 2, though I should have covered it in Part 3.</p>
<p>Ultimately, that&#8217;s the direction it goes though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2007/03/07/criki-the-creation-of-a-wiki-with-cakephp-part-2/comment-page-1/#comment-5383</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Thu, 08 Mar 2007 17:59:20 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/03/07/criki-the-creation-of-a-wiki-with-cakephp-part-2/#comment-5383</guid>
		<description>@Seth: Sure. Look at EntriesController::view(), in this function the parsing of the wiki document happens. If this functionality is put to a component, this function could look like:
&lt;pre&gt;
function view($title = null) {
  if(!$title) {
    $this-&gt;Session-&gt;setFlash(&#039;Invalid Entry.&#039;);
    $this-&gt;redirect(&#039;/entries/index&#039;);
  }
  $entry = $this-&gt;Entry-&gt;findByTitle($title);
  if ($entry) {
    $content = $entry[&#039;Entry&#039;][&#039;content&#039;];
    $this-&gt;set(&#039;entry&#039;, $this-&gt;Parser-&gt;parse($content));
  } else {
    $this-&gt;redirect(&#039;/entries/edit/&#039; . preg_replace(&quot;/[^a-z]/&quot;, &#039;&#039;, strtolower($title)));
  }
}
&lt;/pre&gt;
I hope you see what I mean :)</description>
		<content:encoded><![CDATA[<p>@Seth: Sure. Look at EntriesController::view(), in this function the parsing of the wiki document happens. If this functionality is put to a component, this function could look like:</p>
<pre>
function view($title = null) {
  if(!$title) {
    $this-&gt;Session-&gt;setFlash('Invalid Entry.');
    $this-&gt;redirect('/entries/index');
  }
  $entry = $this-&gt;Entry-&gt;findByTitle($title);
  if ($entry) {
    $content = $entry['Entry']['content'];
    $this-&gt;set('entry', $this-&gt;Parser-&gt;parse($content));
  } else {
    $this-&gt;redirect('/entries/edit/' . preg_replace("/[^a-z]/", '', strtolower($title)));
  }
}
</pre>
<p>I hope you see what I mean :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Seth</title>
		<link>http://cakebaker.42dh.com/2007/03/07/criki-the-creation-of-a-wiki-with-cakephp-part-2/comment-page-1/#comment-5362</link>
		<dc:creator>Seth</dc:creator>
		<pubDate>Wed, 07 Mar 2007 20:33:58 +0000</pubDate>
		<guid isPermaLink="false">http://cakebaker.42dh.com/2007/03/07/criki-the-creation-of-a-wiki-with-cakephp-part-2/#comment-5362</guid>
		<description>You said &quot;I think the rendering of the markup shouldn’t be done in the controller.&quot;

I was wondering if you could elaborate a little more, or provide a counter-example. After poking around through the source code, and being new to CakePHP, I couldn&#039;t figure out what you meant by that.</description>
		<content:encoded><![CDATA[<p>You said &#8220;I think the rendering of the markup shouldn’t be done in the controller.&#8221;</p>
<p>I was wondering if you could elaborate a little more, or provide a counter-example. After poking around through the source code, and being new to CakePHP, I couldn&#8217;t figure out what you meant by that.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
