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

Page

A page is presented using a View object.

Sample:

sections:
- slug: statsname: Statstype: pagepage: StatsPage

Then define your view object page:

classStats < TinyAdmin::Views::DefaultLayoutdeftemplatesuperdoh1{'Stats page'}endenddeftitle'A stats page'endend

Content

A Content object is a like a Page but its content is defined directly in the configuration itself.

Sample:

sections:
- slug: test-contentname: Test contenttype: contentcontent: > <h1>Test content!</h1> <p>Some test content</p>

PageNotFound and RecordNotFound

You can customise also the page for missing pages (PageNotFound) and the page for missing records (RecordNotFound) using your own View objects.

Sample:

page_not_found: PageNotFoundrecord_not_found: RecordNotFound

And then:

classPageNotFound < TinyAdmin::Views::DefaultLayoutdeftemplatesuperdoh1{'Page not found!'}endendendclassRecordNotFound < TinyAdmin::Views::DefaultLayoutdeftemplatesuperdoh1{'Record not found!'}endendend

Clone this wiki locally