<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" 
      xmlns:thr="http://purl.org/syndication/thread/1.0">
  <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html" />
  <link rel="self" type="application/atom+xml" href="http://forums.movabletype.org/atom.xml" />
  <id>tag:forums.movabletype.org,2011://24/tag:forums.movabletype.org,2009://24.15891-</id>
  <updated>2011-09-01T02:24:25Z</updated>
  <title>Comments for Pagination on front page</title>
  
  <generator uri="http://www.sixapart.com/movabletype/">Movable Type 4.292</generator>
  <entry>
    <id>tag:forums.movabletype.org,2009://24.15891</id>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html" />
    <link rel="service.edit" type="application/atom+xml" href="http://www.movabletype.org/cgi-bin/mt/mt-atom.cgi/weblog/blog_id=24/entry_id=15891" title="Pagination on front page" />
    <published>2009-07-07T21:17:34Z</published>
    <updated>2009-07-24T03:08:04Z</updated>
    <title>Pagination on front page</title>
    <summary>Are there any simple options other than plugins to enable pagination on the front page or any other page for that matter?...</summary>
    <author>
      <name>Mike Johnston</name>
      <uri>http://thatcriticguy.com</uri>
    </author>
    
    <category term="Installation" />
    
    <content type="html" xml:lang="en" xml:base="http://forums.movabletype.org/">
      <![CDATA[<p>Are there any simple options other than plugins to enable pagination on the front page or any other page for that matter?</p>]]>
      
    </content>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15891-comment:26141</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15891" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html#c26141" />
    <title>Comment from Culture Snob on 2009-07-07</title>
    <author>
        <name>Culture Snob</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Not sure if this is what you're looking for, but if your front page has 30 entries, this will send readers to the 31st if, in your monthly archives, the title has an id of its entry ID:</p>

<pre>
&lt;mt:entries lastn="1" include_blogs="1" offset="30"&gt;&lt;a href="&lt;$mt:blogurl$&gt;&lt;$mt:entrydate format="%Y/%m/"$&gt;#entry-&lt;$mt:entryid$&gt;"&gt;Next &amp;raquo;&lt;/a&gt;&lt;/mt:entries&gt;
</pre>

<p>It isn't true pagination, but it basically turns your monthly archives into extensions of your front page.</p>]]>
    </content>
    <published>2009-07-07T21:41:17Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15891-comment:26145</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15891" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html#c26145" />
    <title>Comment from Mike Johnston on 2009-07-07</title>
    <author>
        <name>Mike Johnston</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Very interesting..  <a>this</a> is my existing main index template, so how would I incorporate the above? (sorry i'm new)</p>]]>
    </content>
    <published>2009-07-07T22:07:18Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15891-comment:26147</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15891" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html#c26147" />
    <title>Comment from Mike Johnston on 2009-07-07</title>
    <author>
        <name>Mike Johnston</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>argh... code is here: <a href="http://pastebin.com/m2d1bdf02" rel="nofollow">http://pastebin.com/m2d1bdf02</a></p>]]>
    </content>
    <published>2009-07-07T22:08:57Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15891-comment:26149</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15891" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html#c26149" />
    <title>Comment from shenews on 2009-07-07</title>
    <author>
        <name>shenews</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>I have some blogs that are far too busy to show an entire month's posts, so I've enabled weekly archives, and created an "Entries Footer" template module (anything in it displays after the last entry) that contains only this:</p>

<p>&lt;MTEntriesFooter&gt;<br />
&lt;MTEntryPrevious&gt;<br />
&lt;a href="&lt;$MTEntryLink archive_type="Weekly"$&gt;"&gt;Keep going: Page back through previous weeks' entries&lt;/a&gt;<br />
&lt;/MTEntryPrevious&gt;<br />
&lt;/MTEntriesFooter&gt; </p>

<p>It goes into Main Index like this:</p>

<p>&lt;MTEntries&gt;<br />
    &lt;$MTInclude module="Entry Summary"$&gt;<br />
    &lt;$MTInclude module="Entries Footer"$&gt;<br />
&lt;/MTEntries&gt;</p>

<p>You do get some repetition of posts in the current week, but I can live with that; you could perhaps combine them, use the next entry's id like an anchor to land on the sequentially next entry, as Culture Snob does.<br />
</p>]]>
    </content>
    <published>2009-07-08T02:44:56Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15891-comment:26177</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15891" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html#c26177" />
    <title>Comment from Mike Johnston on 2009-07-08</title>
    <author>
        <name>Mike Johnston</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>I'd like to attempt to use Culture snobs' idea but I can't seem to get it to work correctly. </p>]]>
    </content>
    <published>2009-07-08T17:23:47Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15891-comment:26219</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15891" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html#c26219" />
    <title>Comment from Dan Wolfgang on 2009-07-09</title>
    <author>
        <name>Dan Wolfgang</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>You might check out <a href="http://www.majordojo.com/2009/05/a-quick-pagination-hack-for-movable-type.php" rel="nofollow">A Quick Pagination Hack for Movable Type</a>. Or, if you're a bit more programming-savvy, take a look at the Motion template set and how it uses the mtShowPage AJAX method along with a custom search handler to do pagination.</p>]]>
    </content>
    <published>2009-07-09T13:23:01Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15891-comment:26261</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15891" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html#c26261" />
    <title>Comment from Culture Snob on 2009-07-09</title>
    <author>
        <name>Culture Snob</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Mike:</p>

<p>The code on that page is less important than your archive structure. The code I posted assumes a monthly archive structure with a URL of www.sample.com/2009/05/ for the May 2009 archive. Are you publishing monthly archives? What does the URL for one of them look like? If it's different from what I've described, this won't work properly. But if you tell me what structure looks like, we can adapt it.</p>

<p>Beyond that, there needs to be an id associated with each entry on your monthly archive. If you're using an entry summary on your monthly archive page, you could add an id to div or h2 element (or just about anything else at the top of the summary) by adding this to it:</p>

<p>id="entry-"</p>

<p>E.g.:</p>

<pre>
&lt;h2 id="entry-&lt;$mt:entryid$&gt;"&gt;&lt;mt:entrytitle&gt;&lt;/h2&gt;
</pre>]]>
    </content>
    <published>2009-07-09T20:47:04Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15891-comment:26263</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15891" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html#c26263" />
    <title>Comment from Culture Snob on 2009-07-09</title>
    <author>
        <name>Culture Snob</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>Trying again ...</p>

<p>--</p>

<p>Mike:</p>

<p>The code on that page is less important than your archive structure. The code I posted assumes a monthly archive structure with a URL of www.sample.com/2009/05/ for the May 2009 archive. Are you publishing monthly archives? What does the URL for one of them look like? If it's different from what I've described, this won't work properly. But if you tell me what structure looks like, we can adapt it.</p>

<p>Beyond that, there needs to be an id associated with each entry on your monthly archive. If you're using an entry summary on your monthly archive page, you could add an id to div or h2 element (or just about anything else at the top of the summary) by adding this to it:</p>

<pre>
id="entry-&lt;$mt:entryid$&gt;"
</pre>

<p>E.g.:</p>

<pre>
&lt;h2 id="entry-&lt;$mt:entryid$&gt;"&gt;&lt;mt:entrytitle&gt;&lt;/h2&gt;
</pre>]]>
    </content>
    <published>2009-07-09T20:48:40Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15891-comment:26269</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15891" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html#c26269" />
    <title>Comment from Culture Snob on 2009-07-09</title>
    <author>
        <name>Culture Snob</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>I don't think I've been clear on my method. I'm going to try again.</p>

<p>If you want "pagination" on the front page -- that is, you want a link at the bottom of the front page sending readers to a list of older entries that begins with the next entry in your archive -- you can do it very simply if (1) your front page is limited to a certain number of entries (rather than a certain number of days) and (2) you are publishing weekly/monthly/yearly archives.</p>

<p>The code will vary, but if you meet both those requirements, it's easy to implement; you only need to drop a line of code in the main index and one in either the entries loop of your date-based archive or the entry summary (if that's what your date-based archive calls). </p>

<p>This is the code for the main index <em>from my blog</em>:</p>

<pre>
&lt;mt:entries lastn="1" include_blogs="1" offset="30"&gt;&lt;a href="&lt;$mt:blogurl$&gt;&lt;$mt:entrydate format="%Y/%m/"$&gt;#entry-&lt;$mt:entryid$&gt;"&gt;Next &amp;raquo;&lt;/a&gt;&lt;/mt:entries&gt;
</pre>

<p>It would need to be customized for the URL format of your date-based archive, and it assumes that your front page shows 30 entries.</p>

<p>What it requires on your date-based archive is an id element for each entry that matches the format from the main-page link. In the case of my code, that's entry-&lt;$mt:entryid$&gt;.</p>

<p>So at the bottom of my main page is a link to this:</p>

<p><a href="http://www.culturesnob.net/2009/01/#entry-1449" rel="nofollow">http://www.culturesnob.net/2009/01/#entry-1449</a></p>

<p>And that links to January 2009 archive and finds the entry with an id of "entry-1449".</p>

<p>I'm sure I'm making it sound more complicated than it actually is, but my point (unclear in my first [and probably second]) reply is that the code I posted won't work unless some other things are done.</p>]]>
    </content>
    <published>2009-07-09T21:25:47Z</published>
  </entry>

  <entry>
    <id>tag:forums.movabletype.org,2009://24.15891-comment:27039</id>
    <thr:in-reply-to ref="tag:forums.movabletype.org,2009://24.15891" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html"/>
    <link rel="alternate" type="text/html" href="http://forums.movabletype.org/2009/07/pagination-on-front-page.html#c27039" />
    <title>Comment from may on 2009-07-23</title>
    <author>
        <name>may</name>
        <uri></uri>
    </author>
    <content type="html" xml:lang="en" xml:base="">
        <![CDATA[<p>thanks everybody, i have learned something ,too.<br />
-------------------------------------------------<br />
welcome to shopping747.com,you may have something you need<br />
</p>]]>
    </content>
    <published>2009-07-24T03:08:04Z</published>
  </entry>

</feed>

