<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
 <generator>http://textpattern.com/</generator>
 <title>Textpattern Tips – Enable pagination with article_custom article listings</title>
 <description>Enable pagination with article_custom article listings - comments</description>
 <link>https://textpattern.tips/enable-pagination-with-article_custom-article-listings</link>
 <atom:link href="https://textpattern.tips/enable-pagination-with-article_custom-article-listings?f=comment-feed" rel="self" type="application/rss+xml" />
 <pubDate>Thu, 10 May 12 20:28:51 +0000</pubDate>

 <item>
     <title>Comment on Enable pagination with article_custom article listings by Aaron Hildebrandt</title>
     <link><a href="https://textpattern.tips/enable-pagination-with-article_custom-article-listings#c000725" id="c000725">1</a></link>
     <guid><a href="https://textpattern.tips/enable-pagination-with-article_custom-article-listings#c000725" id="c000725">1</a></guid>
     <pubDate>Thu, 03 Jun 10 21:56:26 +0000</pubDate>
     <description><![CDATA[<p>Here&#8217;s a version that achieves the same thing without using any plug-ins:</p><pre><code>&lt;txp:php&gt;
	// Initial setup
	global $variable;
	$variable["article-limit"] = 10; // Set to whatever you want
	$variable["article-count"] = 0;
	if(isset($_GET["page"])) { $variable["page"] = $_GET["page"]; }
	else { $variable["page"] = 1; }
	$variable["offset"] = ($variable["page"]-1)*$variable["article-limit"];
&lt;/txp:php&gt;
&lt;txp:article_custom section="whatever sections you'd like" limit="9999" status="4"&gt;
	&lt;txp:php&gt;
		// Count the articles
		global $variable;
		$variable["article-count"]++;
	&lt;/txp:php&gt;
&lt;/txp:article_custom&gt;
&lt;txp:php&gt;
	// Determine the page count
	global $variable;
	$variable["page-count"] = ceil($variable["article-count"] / $variable["article-limit"]);
&lt;/txp:php&gt;
&lt;txp:article_custom section="whatever sections you'd like" pgonly="0" status="4" limit='&lt;txp:variable name="article-limit" /&gt;' offset='&lt;txp:variable name="offset" /&gt;' /&gt;
&lt;txp:php&gt;
	// Output pagination
	global $variable;
	if(($variable["page"]+1) &lt;= $variable["page-count"]) {
		echo "&lt;div class=\"older\"&gt;&lt;a href=\"?page=". ($variable["page"]+1) ."\"&gt;Older articles &amp;raquo;&lt;/a&gt;&lt;/div&gt;";
	}
	if($variable["page"]-1) {
		echo "&lt;div class=\"newer\"&gt;&lt;a href=\"?page=". ($variable["page"]-1) ."\"&gt;&amp;laquo; Newer articles&lt;/a&gt;&lt;/div&gt;";
	}
&lt;/txp:php&gt;
</code></pre>]]></description>
     <content:encoded><![CDATA[<p>Here&#8217;s a version that achieves the same thing without using any plug-ins:</p><pre><code>&lt;txp:php&gt;
	// Initial setup
	global $variable;
	$variable["article-limit"] = 10; // Set to whatever you want
	$variable["article-count"] = 0;
	if(isset($_GET["page"])) { $variable["page"] = $_GET["page"]; }
	else { $variable["page"] = 1; }
	$variable["offset"] = ($variable["page"]-1)*$variable["article-limit"];
&lt;/txp:php&gt;
&lt;txp:article_custom section="whatever sections you'd like" limit="9999" status="4"&gt;
	&lt;txp:php&gt;
		// Count the articles
		global $variable;
		$variable["article-count"]++;
	&lt;/txp:php&gt;
&lt;/txp:article_custom&gt;
&lt;txp:php&gt;
	// Determine the page count
	global $variable;
	$variable["page-count"] = ceil($variable["article-count"] / $variable["article-limit"]);
&lt;/txp:php&gt;
&lt;txp:article_custom section="whatever sections you'd like" pgonly="0" status="4" limit='&lt;txp:variable name="article-limit" /&gt;' offset='&lt;txp:variable name="offset" /&gt;' /&gt;
&lt;txp:php&gt;
	// Output pagination
	global $variable;
	if(($variable["page"]+1) &lt;= $variable["page-count"]) {
		echo "&lt;div class=\"older\"&gt;&lt;a href=\"?page=". ($variable["page"]+1) ."\"&gt;Older articles &amp;raquo;&lt;/a&gt;&lt;/div&gt;";
	}
	if($variable["page"]-1) {
		echo "&lt;div class=\"newer\"&gt;&lt;a href=\"?page=". ($variable["page"]-1) ."\"&gt;&amp;laquo; Newer articles&lt;/a&gt;&lt;/div&gt;";
	}
&lt;/txp:php&gt;
</code></pre>]]></content:encoded>
     <dc:creator><a rel="nofollow" href="http://andcuriouser.com/">Aaron Hildebrandt</a></dc:creator>
 
</item>
<item>
     <title>Comment on Enable pagination with article_custom article listings by Markus Merz | Hamburg St. Georg</title>
     <link><a href="https://textpattern.tips/enable-pagination-with-article_custom-article-listings#c000966" id="c000966">1</a></link>
     <guid><a href="https://textpattern.tips/enable-pagination-with-article_custom-article-listings#c000966" id="c000966">1</a></guid>
     <pubDate>Mon, 11 Jul 11 20:36:37 +0000</pubDate>
     <description><![CDATA[<p><a href="http://forum.textpattern.com/viewtopic.php?id=33821" rel="nofollow">Textpattern forum thread for Aarons plug-in less solution</a></p>]]></description>
     <content:encoded><![CDATA[<p><a href="http://forum.textpattern.com/viewtopic.php?id=33821" rel="nofollow">Textpattern forum thread for Aarons plug-in less solution</a></p>]]></content:encoded>
     <dc:creator><a rel="nofollow" href="http://sankt-georg.info/">Markus Merz | Hamburg St. Georg</a></dc:creator>
 
</item>
<item>
     <title>Comment on Enable pagination with article_custom article listings by etc</title>
     <link><a href="https://textpattern.tips/enable-pagination-with-article_custom-article-listings#c001095" id="c001095">1</a></link>
     <guid><a href="https://textpattern.tips/enable-pagination-with-article_custom-article-listings#c001095" id="c001095">1</a></guid>
     <pubDate>Thu, 10 May 12 20:28:51 +0000</pubDate>
     <description><![CDATA[<p>Pagination is an easy task with a little XPath and <a href="http://forum.textpattern.com/viewtopic.php?id=37932" rel="nofollow">this plugin</a></p><pre><code>&lt;txp:etc_query 
data='&lt;txp:article_custom limit="999"&gt;
&lt;a href=''&lt;txp:permlink /&gt;'' id=''link-to-&lt;txp:article_id /&gt;''&gt;&lt;txp:title /&gt;&lt;/a&gt;
&lt;/txp:article_custom&gt;' 
query="a[@id='link-to-?id' or '?id'='' and position()=1]" 
replace="following-sibling::a[position()=5]/text()=Next;preceding-sibling::a[position()=5]/text()=Prev"
specials="query"&gt;
{preceding-sibling::a[position()=5]}{preceding-sibling::a[position()&lt;5]}{?}{following-sibling::a[position()&lt;5]}{following-sibling::a[position()=5]}
&lt;/txp:etc_query&gt;
</code></pre>]]></description>
     <content:encoded><![CDATA[<p>Pagination is an easy task with a little XPath and <a href="http://forum.textpattern.com/viewtopic.php?id=37932" rel="nofollow">this plugin</a></p><pre><code>&lt;txp:etc_query 
data='&lt;txp:article_custom limit="999"&gt;
&lt;a href=''&lt;txp:permlink /&gt;'' id=''link-to-&lt;txp:article_id /&gt;''&gt;&lt;txp:title /&gt;&lt;/a&gt;
&lt;/txp:article_custom&gt;' 
query="a[@id='link-to-?id' or '?id'='' and position()=1]" 
replace="following-sibling::a[position()=5]/text()=Next;preceding-sibling::a[position()=5]/text()=Prev"
specials="query"&gt;
{preceding-sibling::a[position()=5]}{preceding-sibling::a[position()&lt;5]}{?}{following-sibling::a[position()&lt;5]}{following-sibling::a[position()=5]}
&lt;/txp:etc_query&gt;
</code></pre>]]></content:encoded>
     <dc:creator><a rel="nofollow" href="http://www.iut-fbleau.fr/projet/etc/">etc</a></dc:creator>
 
</item>

</channel>
</rss>