Not a developer? Go to MovableType.com

Plugin and Theme Directory

Hybrid Pagination v1.0

By Brad Choate
Posted December 10, 2008, in Dynamic Publishing.

Details

Hybrid Pagination, a plugin for Movable Type

This plugin provides a means for doing pagination of a template module in Movable Type. It expects the following:

  • An index template that is statically published, as a PHP file.
  • A template module that is written to support pagination.

From the index template, you would make use of the "PaginateModule" MT tag which is provided by this plugin. It works much like the MT "Include" tag, when used with a "module" attribute. For example:

<$MTPaginateModule module="Entries Loop"$>

The template module should look something like this (paginates by 20 entries):

<MTEntries offset="auto" lastn="20">

    (place your entry summary markup here)

<mt:IfStatic>
<mt:EntriesFooter>
    <mt:EntryNext setvar="has_more">1</mt:EntryNext>
</mt:EntriesFooter>
</mt:IfStatic>
</MTEntries>

<div class="content-nav">
<mt:IfDynamic>
<mt:IfPreviousResults>
    <a rel="prev" href="<$mt:NextLink>">&lt; Older &nbsp;</a>
</mt:IfPreviousResults>
<mt:PagerBlock>
    <mt:IfCurrentPage>
        <$mt:Var name="__value__"$>
    <mt:Else>
        <a href="<$mt:PagerLink$>"><$mt:Var name="__value__"$></a>
    </mt:IfCurrentPage>
    <mt:Unless name="__last__">&nbsp;</mt:Unless>
</mt:PagerBlock>
<mt:IfMoreResults>
    <a rel="next" href="<$mt:PreviousLink$>">&nbsp; Newer &gt;</a>
</mt:IfMoreResults>
</mt:IfDynamic>
<mt:IfStatic>
<mt:If name="has_more">
    <a rel="prev" href="?offset=20">&lt; Older</a>
</mt:If>
</mt:IfStatic>
</div>

This produces a simple single "Older" link for the statically published page which takes you to the hybrid static and dynamic page, which then offers full navigation for the module. If you are paginating something other than a MTEntries tag, you can use the same mechanism, but you may need to gather the 'offset' query parameter manually and use it to display the range of results you desire.

Installation

To install this plugin, drop the files included with this plugin into your Movable Type directory (under the plugins/HybridPagination directory).

For a guide to installing Movable Type plugins packaged in this way, please visit http://tinyurl.com/6dfsm3

Requirements

PHP

Compatibility

Movable Type versions: 4.3


Back

8 Comments

Sunil Shrestha

Sunil Shrestha on August 12, 2016, 2:29 a.m. Reply

Installation I got some problems. 192.168.1.1

manux25

manux25 on September 6, 2016, 11:38 a.m. Reply

Excellent plugin, has been very useful for my gay web, thanks!

Xhamster

Xhamster on April 18, 2017, 9:28 a.m. Reply

Se volete vedere video e filmati amatoriali provate a cercare in Xhamster ne potete trovare quanti ne volete

Rustambek

Rustambek on May 14, 2017, 9:57 a.m. Reply

Cages will glow when a bunny is properly positioned to enter a cage. downloadallthingshere.download That means you can store, edit, create and enhance your files on your computer and download them back to the iphone.

white smith

white smith on June 27, 2017, 11:34 a.m. Reply

Thank you so much for sharing the introduction of hybrid pagination here. I think the source code help everyone to follow the steps easily. I have some doubt about the installation procedures and so please make it clear. go to this website

Hellenrose

Hellenrose on June 28, 2017, 11:36 a.m. Reply

Since i was looking for some plugins to do pagination, this piece of information is very useful to me. I would like to install this plugin but the steps of it is not at all clear to me. Could you please update it? best internet provider

binasa

binasa on July 14, 2017, 3:10 a.m. Reply

Hablamos Espaol!100% SECURE- Your safety and security are our absolute priority. http://downloadfreefilesfromme.com Nice way to find out what events are scheduled in your community.

Leave a Comment