<?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: Four new tutorials about IIS, ACL, an online editor, and pagination</title>
	<atom:link href="http://cakebaker.42dh.com/2006/05/20/four-new-tutorials-about-iis-acl-an-online-editor-and-pagination/feed/" rel="self" type="application/rss+xml" />
	<link>http://cakebaker.42dh.com/2006/05/20/four-new-tutorials-about-iis-acl-an-online-editor-and-pagination/</link>
	<description>baking cakes with CakePHP</description>
	<lastBuildDate>Tue, 31 Jan 2012 15:12:14 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2006/05/20/four-new-tutorials-about-iis-acl-an-online-editor-and-pagination/comment-page-1/#comment-97328</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Fri, 04 Jul 2008 16:55:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=191#comment-97328</guid>
		<description>@yunhaihuang: Cool to hear you could solve at least one problem!</description>
		<content:encoded><![CDATA[<p>@yunhaihuang: Cool to hear you could solve at least one problem!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yunhaihuang</title>
		<link>http://cakebaker.42dh.com/2006/05/20/four-new-tutorials-about-iis-acl-an-online-editor-and-pagination/comment-page-1/#comment-97266</link>
		<dc:creator>yunhaihuang</dc:creator>
		<pubDate>Fri, 04 Jul 2008 02:44:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=191#comment-97266</guid>
		<description>Thanks a lots for your advices. i&#039;ve solve my first problem by using your idea. thanks a lot!
The second problem hasn&#039;t been solved yet!</description>
		<content:encoded><![CDATA[<p>Thanks a lots for your advices. i&#8217;ve solve my first problem by using your idea. thanks a lot!<br />
The second problem hasn&#8217;t been solved yet!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thinking about the pagination feature - cakebaker</title>
		<link>http://cakebaker.42dh.com/2006/05/20/four-new-tutorials-about-iis-acl-an-online-editor-and-pagination/comment-page-1/#comment-96838</link>
		<dc:creator>Thinking about the pagination feature - cakebaker</dc:creator>
		<pubDate>Sun, 29 Jun 2008 13:48:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=191#comment-96838</guid>
		<description>[...] I was asked by yunhaihuang some questions about advanced pagination stuff I couldn&#8217;t answer [...]</description>
		<content:encoded><![CDATA[<p>[...] I was asked by yunhaihuang some questions about advanced pagination stuff I couldn&#8217;t answer [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2006/05/20/four-new-tutorials-about-iis-acl-an-online-editor-and-pagination/comment-page-1/#comment-96435</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Fri, 27 Jun 2008 12:47:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=191#comment-96435</guid>
		<description>@yunhaihuang: Probably a better idea for point 1 is to set a certain value for the conditions and depending on this value you either perform the normal count or the custom count. Example:
&lt;pre&gt;
// in your controller
$this-&gt;paginate[&#039;YourModel&#039;][&#039;conditions&#039;] = &#039;custom&#039;;

// in your model 
public function paginateCount($conditions = null, $recursive = 0) {
    if ($conditions == &#039;custom&#039;) {
        // perform count with custom query
    } else {
        // perform normal count
    }
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>@yunhaihuang: Probably a better idea for point 1 is to set a certain value for the conditions and depending on this value you either perform the normal count or the custom count. Example:</p>
<pre>
// in your controller
$this-&gt;paginate['YourModel']['conditions'] = 'custom';

// in your model
public function paginateCount($conditions = null, $recursive = 0) {
    if ($conditions == 'custom') {
        // perform count with custom query
    } else {
        // perform normal count
    }
}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: cakebaker</title>
		<link>http://cakebaker.42dh.com/2006/05/20/four-new-tutorials-about-iis-acl-an-online-editor-and-pagination/comment-page-1/#comment-96354</link>
		<dc:creator>cakebaker</dc:creator>
		<pubDate>Thu, 26 Jun 2008 16:19:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=191#comment-96354</guid>
		<description>@yunhaihuang: An idea for point 1 is to create a new model which uses the same table as the original model. In this new model you then override the paginateCount() method. But I&#039;m not sure whether this is the best solution...

Regarding point 2 I don&#039;t know how you could accomplish that, you might ask in the CakePHP Google group or in the IRC channel, maybe someone there has an idea...

Hope that helps!</description>
		<content:encoded><![CDATA[<p>@yunhaihuang: An idea for point 1 is to create a new model which uses the same table as the original model. In this new model you then override the paginateCount() method. But I&#8217;m not sure whether this is the best solution&#8230;</p>
<p>Regarding point 2 I don&#8217;t know how you could accomplish that, you might ask in the CakePHP Google group or in the IRC channel, maybe someone there has an idea&#8230;</p>
<p>Hope that helps!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yunhaihuang</title>
		<link>http://cakebaker.42dh.com/2006/05/20/four-new-tutorials-about-iis-acl-an-online-editor-and-pagination/comment-page-1/#comment-96244</link>
		<dc:creator>yunhaihuang</dc:creator>
		<pubDate>Wed, 25 Jun 2008 14:09:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=191#comment-96244</guid>
		<description>2. in my view, i display a list of months which hold exhibitions, each month i display the exhibitions is hold in. I want to show only two months on each page, in each month, only 3 exhibition is displayed. so i have to paging with two different criterion. how do i do this? i&#039;m using ajax in paging. the function to retrieve data is index().
thanks a lots!</description>
		<content:encoded><![CDATA[<p>2. in my view, i display a list of months which hold exhibitions, each month i display the exhibitions is hold in. I want to show only two months on each page, in each month, only 3 exhibition is displayed. so i have to paging with two different criterion. how do i do this? i&#8217;m using ajax in paging. the function to retrieve data is index().<br />
thanks a lots!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yunhaihuang</title>
		<link>http://cakebaker.42dh.com/2006/05/20/four-new-tutorials-about-iis-acl-an-online-editor-and-pagination/comment-page-1/#comment-96242</link>
		<dc:creator>yunhaihuang</dc:creator>
		<pubDate>Wed, 25 Jun 2008 13:40:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=191#comment-96242</guid>
		<description>hi! please help me to solve these problem:
1. can i modify the sql query of function paginateCount(), which counts how many pages is, to fix an Individual pagninate? i don&#039;t want to override this function as &quot;http://book.cakephp.org/view/164/pagination&quot;, doing this will affect my other paginate.
in default, it&#039;s sql is &quot;count(*) as count...&quot;, i want to edit it like &quot;count(distinct MONTH(startdate)) as count...&quot;. if i can, how to do that?</description>
		<content:encoded><![CDATA[<p>hi! please help me to solve these problem:<br />
1. can i modify the sql query of function paginateCount(), which counts how many pages is, to fix an Individual pagninate? i don&#8217;t want to override this function as &#8220;http://book.cakephp.org/view/164/pagination&#8221;, doing this will affect my other paginate.<br />
in default, it&#8217;s sql is &#8220;count(*) as count&#8230;&#8221;, i want to edit it like &#8220;count(distinct MONTH(startdate)) as count&#8230;&#8221;. if i can, how to do that?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yunhaihuang</title>
		<link>http://cakebaker.42dh.com/2006/05/20/four-new-tutorials-about-iis-acl-an-online-editor-and-pagination/comment-page-1/#comment-96226</link>
		<dc:creator>yunhaihuang</dc:creator>
		<pubDate>Wed, 25 Jun 2008 09:57:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=191#comment-96226</guid>
		<description>hi! please help me to solve these two questions:
1.in the paginator helper, may i modify the sql query of function counter . because in default, this query is &quot;SELECT COUNT(*) AS `count` FROM ....&quot;, i want to modify it like &quot;SELECT COUNT(MONTH(startdate)) AS `count` FROM... &quot; (startdate (data type: date) is one field in my database). how can i do this?

2.My view page show a list of months which have the exhibitions, and each month show the exhibitions is hold in that month.
i want to display each page content two months, and each month display three exhibitions. how can i do this?
may i use two different paginator helper in the same view page? if can, how to do this?</description>
		<content:encoded><![CDATA[<p>hi! please help me to solve these two questions:<br />
1.in the paginator helper, may i modify the sql query of function counter . because in default, this query is &#8220;SELECT COUNT(*) AS `count` FROM &#8230;.&#8221;, i want to modify it like &#8220;SELECT COUNT(MONTH(startdate)) AS `count` FROM&#8230; &#8221; (startdate (data type: date) is one field in my database). how can i do this?</p>
<p>2.My view page show a list of months which have the exhibitions, and each month show the exhibitions is hold in that month.<br />
i want to display each page content two months, and each month display three exhibitions. how can i do this?<br />
may i use two different paginator helper in the same view page? if can, how to do this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yunhaihuang</title>
		<link>http://cakebaker.42dh.com/2006/05/20/four-new-tutorials-about-iis-acl-an-online-editor-and-pagination/comment-page-1/#comment-96224</link>
		<dc:creator>yunhaihuang</dc:creator>
		<pubDate>Wed, 25 Jun 2008 09:47:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=191#comment-96224</guid>
		<description>hi!
may view page show a list of months which have the exhibitions, and each month show the exhibitions is hold in that month.
i want to display each page content two months, and each month display three exhibitions. how can i do this?
may i use two different paginator in the same view page?</description>
		<content:encoded><![CDATA[<p>hi!<br />
may view page show a list of months which have the exhibitions, and each month show the exhibitions is hold in that month.<br />
i want to display each page content two months, and each month display three exhibitions. how can i do this?<br />
may i use two different paginator in the same view page?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: yunhaihuang</title>
		<link>http://cakebaker.42dh.com/2006/05/20/four-new-tutorials-about-iis-acl-an-online-editor-and-pagination/comment-page-1/#comment-96196</link>
		<dc:creator>yunhaihuang</dc:creator>
		<pubDate>Wed, 25 Jun 2008 02:39:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.cakebaker.42dh.com/?p=191#comment-96196</guid>
		<description>thanks!</description>
		<content:encoded><![CDATA[<p>thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

