Class: Thoth::ArchiveController

### Home Classes Methods

### In Files

- lib/thoth/controller/archive.rb

### Parent

Ramaze::Controller

### Methods

- #index

### Files

- robots.txt

### Class/Module Index

Quicksearch

- Thoth
- Thoth::AdminController
- Thoth::ArchiveController
- Thoth::Comment
- Thoth::CommentApiController
- Thoth::CommentController
- Thoth::Config
- Thoth::Error
- Thoth::Importer
- Thoth::MainController
- Thoth::Media
- Thoth::MediaController
- Thoth::MinifyController
- Thoth::Page
- Thoth::PageApiController
- Thoth::PageController
- Thoth::Pager
- Thoth::Plugin
- Thoth::Plugin::Delicious
- Thoth::Plugin::Flickr
- Thoth::Plugin::Tags
- Thoth::Plugin::Twitter
- Thoth::Post
- Thoth::PostApiController
- Thoth::PostController
- Thoth::SchemaError
- Thoth::SearchController
- Thoth::Tag
- Thoth::TagApiController
- Thoth::TagController
- Thoth::TagsPostsMap
- Ramaze
- Ramaze::Dispatcher
- Ramaze::Dispatcher::File
- Ramaze::Helper
- Ramaze::Helper::Admin
- Ramaze::Helper::Cookie
- Ramaze::Helper::Error
- Ramaze::Helper::Pagination
- Ramaze::Helper::Sanitize
- Ramaze::Helper::Wiki
- Ramaze::Helper::Ysearch
- Ramaze::Helper::Ysearch::SearchError
- AddMediaSize
- CreateSchema
- PantsImporter
- PoseidonImporter

No matching classes.

# Thoth::ArchiveController

### Public Instance Methods

index(page = 1) click to toggle source

    # File lib/thoth/controller/archive.rb, line 41
    def index(page = 1)
      page = page.to_i
      page = 1 unless page >= 1

      @posts = Post.recent(page, 10)

      if page > @posts.page_count && @posts.page_count > 0
        page = @posts.page_count
        @posts = Post.recent(page, 10)
      end

      @title = "#{Config.site.name} Archives (page #{page} of " <<
          "#{@posts.page_count > 0 ? @posts.page_count : 1})"

      @pager = pager(@posts)
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.