# New Paginated Archive Extension: What Next?

**URL:** <https://www.ruby-forum.com/t/new-paginated-archive-extension-what-next/119270>\
**Category:** Radiant CMS\
**Created:** [November 5, 2007, 6:10pm UTC](https://www.ruby-forum.com/t/new-paginated-archive-extension-what-next/119270 "2007-11-05T18:10:28Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![usrlocal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/aeb1de/32.png) [@usrlocal](https://www.ruby-forum.com/u/usrlocal)\
**Post date:** [November 5, 2007, 6:10pm UTC](https://www.ruby-forum.com/t/new-paginated-archive-extension-what-next/119270/1 "2007-11-05T18:10:28Z")

</div>

Hi All,

Apparently, Radiant offered no built-in support for  
pagination of Archive Pages, like what you’d need to  
set up a blog.

So I wrote one, Paginated Archive.

Paginated Archive paginates child pages, works as a  
drop-in replacement for Archive Page, and defines tags  
to help in creating paginated navigation. Users can  
configure (via a ‘config’ part using YAML) the number  
of items per page and the redirect page in case an  
invalid page is requested. It uses Bruce W.’  
excellent paginator gem:

[http://rubyforge.org/projects/paginator](http://rubyforge.org/projects/paginator)

What’s the standard practice for distributing Radiant  
extenstions? This is only my second extension, so I’m  
sure there are things to fix. It seems too small to  
create a RubyForge project. And I’d rather not run my  
own SVN server.

I can think of other ways to make the extension  
available, but what’s the best way?

Cheers,  
Rich

* * *

Richard L. Apodaca

[http://depth-first.com](http://depth-first.com) Blog  
[http://metamolecular.com](http://metamolecular.com) Company

---

<div class="post-metadata">

**Author:** ![usrlocal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/aeb1de/32.png) [@usrlocal](https://www.ruby-forum.com/u/usrlocal)\
**Post date:** [November 5, 2007, 6:19pm UTC](https://www.ruby-forum.com/t/new-paginated-archive-extension-what-next/119270/2 "2007-11-05T18:19:16Z")

</div>

> What’s the standard practice for distributing Radiant  
> extenstions? This is only my second extension, so I’m  
> sure there are things to fix. It seems too small to  
> create a RubyForge project. And I’d rather not run my  
> own SVN server.
> 
> I can think of other ways to make the extension  
> available, but what’s the best way?

Have you thought about Google Code? That seems like a nice way to  
distribute smaller projects.

I hope you finf a way, I am interested in seeing this. I wrote a  
similar extension for a customer, but it is not ready for prime time.

Keith B.

---

<div class="post-metadata">

**Author:** ![usrlocal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/aeb1de/32.png) [@usrlocal](https://www.ruby-forum.com/u/usrlocal)\
**Post date:** [November 6, 2007, 2:07am UTC](https://www.ruby-forum.com/t/new-paginated-archive-extension-what-next/119270/3 "2007-11-06T02:07:27Z")

</div>

Hi Richard,

Looks very interesting. Hope you can find a way to distribute it  
soon. Meanwhile could I get a copy by email to check it out?

saji  
…

- richard apodaca [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) [2007-11-05 09:09:21 -0800]:

> to help in creating paginated navigation. Users can  
> create a RubyForge project. And I’d rather not run my  
> Richard L. Apodaca
> 
> [http://depth-first.com](http://depth-first.com) Blog  
> [http://metamolecular.com](http://metamolecular.com) Company
> 
> * * *
> 
> Radiant mailing list  
> Post: removed\_email\_address@domain.invalid  
> Search: [http://radiantcms.org/mailing-list/search/](http://radiantcms.org/mailing-list/search/)  
> Site: [http://lists.radiantcms.org/mailman/listinfo/radiant](http://lists.radiantcms.org/mailman/listinfo/radiant)

–  
Saji N. Hameed

APEC Climate Center +82 51 668 7470  
National Pension Corporation Busan Building 12F  
Yeonsan 2-dong, Yeonje-gu, BUSAN 611705 removed\_email\_address@domain.invalid  
KOREA

---

<div class="post-metadata">

**Author:** ![usrlocal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/aeb1de/32.png) [@usrlocal](https://www.ruby-forum.com/u/usrlocal)\
**Post date:** [November 7, 2007, 6:26am UTC](https://www.ruby-forum.com/t/new-paginated-archive-extension-what-next/119270/4 "2007-11-07T06:26:05Z")

</div>

— Daniel S. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> How have you handled page urls are you doing  
> something like:
> 
> /archive/page/1
> 
> or are you doing
> 
> /archive?page=1

Using the /archive?page=1 format and did indeed have  
to turn caching off.

> If the later, you’ll have to turn off caching for  
> your page -  
> radiant doesn’t handle query params on a cached page  
> (something  
> that I’m planning on fixing up in the near future,  
> but tossing  
> up over implementations).

Great - I’ll be looking for it.

> Dan.
> 
> * * *
> 
> Radiant mailing list  
> Post: removed\_email\_address@domain.invalid  
> Search: [http://radiantcms.org/mailing-list/search/](http://radiantcms.org/mailing-list/search/)  
> Site:  
> [http://lists.radiantcms.org/mailman/listinfo/radiant](http://lists.radiantcms.org/mailman/listinfo/radiant)

* * *

Richard L. Apodaca

[http://depth-first.com](http://depth-first.com) Blog  
[http://metamolecular.com](http://metamolecular.com) Company

---

<div class="post-metadata">

**Author:** ![usrlocal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/aeb1de/32.png) [@usrlocal](https://www.ruby-forum.com/u/usrlocal)\
**Post date:** [November 7, 2007, 5:03pm UTC](https://www.ruby-forum.com/t/new-paginated-archive-extension-what-next/119270/5 "2007-11-07T17:03:06Z")

</div>

I’ve released the Paginated Archive extension:

[http://depth-first.com/articles/2007/11/07/paginated-archives-in-radiant-cms-the-power-of-minimal-but-extendable-systems](http://depth-first.com/articles/2007/11/07/paginated-archives-in-radiant-cms-the-power-of-minimal-but-extendable-systems)

Paginated Archive is a drop-in replacement for  
Radiant’s own Archive Page and is suitable for large  
blog-like archives. In other words, your archive pages  
can now be grouped by date _and_ paginated - just like  
a blog.

The size of pages and the redirect page (for invalid  
page numbers) can be specified by creating a ‘config’  
part for the archive. Here is a sample:

items\_per\_page: 5  
invalid\_page\_redirect: ‘/not-found’

Paginated archive requires Bruce W.’ Paginator  
gem:

[http://www.codefluency.com/2006/10/24/paginator-released](http://www.codefluency.com/2006/10/24/paginator-released)

Cheers,  
Rich

* * *

Richard L. Apodaca

[http://depth-first.com](http://depth-first.com) Blog  
[http://metamolecular.com](http://metamolecular.com) Company

---

<div class="post-metadata">

**Author:** ![usrlocal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/aeb1de/32.png) [@usrlocal](https://www.ruby-forum.com/u/usrlocal)\
**Post date:** [November 7, 2007, 5:46pm UTC](https://www.ruby-forum.com/t/new-paginated-archive-extension-what-next/119270/6 "2007-11-07T17:46:25Z")

</div>

On Nov 7, 2007, at 11:02 AM, richard apodaca wrote:

> I’ve released the Paginated Archive extension:

Cool! Good work!

> Paginated archive requires Bruce W.’ Paginator gem:

I’d have figured will\_paginate would have been a better choice?

–  
Damien McKenna - Husband, father, geek.  
removed\_email\_address@domain.invalid - [http://www.mc-kenna.com/](http://www.mc-kenna.com/)  
[http://twitter.com/DamienMcKenna](http://twitter.com/DamienMcKenna)  
[http://www.linkedin.com/in/damienmckenna](http://www.linkedin.com/in/damienmckenna)

---

<div class="post-metadata">

**Author:** ![usrlocal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/aeb1de/32.png) [@usrlocal](https://www.ruby-forum.com/u/usrlocal)\
**Post date:** [November 7, 2007, 3:37am UTC](https://www.ruby-forum.com/t/new-paginated-archive-extension-what-next/119270/7 "2007-11-07T03:37:12Z")

</div>

> Apparently, Radiant offered no built-in support for  
> pagination of Archive Pages, like what you’d need to  
> set up a blog.
> 
> So I wrote one, Paginated Archive.

I was planning on doing the same but got a little distracted.

How have you handled page urls are you doing something like:

/archive/page/1

or are you doing

/archive?page=1

If the later, you’ll have to turn off caching for your page -  
radiant doesn’t handle query params on a cached page (something  
that I’m planning on fixing up in the near future, but tossing  
up over implementations).

Dan.

---

<div class="post-metadata">

**Author:** ![usrlocal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/aeb1de/32.png) [@usrlocal](https://www.ruby-forum.com/u/usrlocal)\
**Post date:** [November 7, 2007, 6:20pm UTC](https://www.ruby-forum.com/t/new-paginated-archive-extension-what-next/119270/8 "2007-11-07T18:20:58Z")

</div>

— Damien McKenna [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> better choice?  
> Hello Damien,

Might have been. will\_paginate seems to be the one  
that gets the most attention. I looked at along with  
Paginator a few months ago when I was evaluating rails  
paginators.

Paginator just seemed to work so well, I didn’t have a  
reason to switch.

* * *

Richard L. Apodaca

[http://depth-first.com](http://depth-first.com) Blog  
[http://metamolecular.com](http://metamolecular.com) Company
