Skip to content
Mattia Roccoberton edited this page May 2, 2023 · 1 revision

The root component is loaded when the main route of the admin is opened.

A redirect to another section can be setup. Sample:

root:
  title: MyAdmin
  redirect: posts

The title is used as label in the navbar component.

Or you can define a specific View object. Sample:

root:
  title: MyAdmin
  page: RootPage

And then:

class RootPage < TinyAdmin::Views::DefaultLayout
  def template
    super do
      h1 { 'A test home page' }
      p { 'Some content...' }
    end
  end
end

Another option can be to define some widgets. Sample:

root:
  widgets:
    - PopularAuthorsWidget
    - LatestPostsWidget
Clone this wiki locally